/* Melt.Tattoo Rainbow Gradient Color Variables */
:root {
    /* Rainbow gradient colors from logo */
    --gradient-pink: #FF6B9D;
    --gradient-orange: #FFA07A;
    --gradient-yellow: #FFD700;
    --gradient-green: #90EE90;
    --gradient-teal: #40E0D0;
    --gradient-blue: #6495ED;
    --gradient-purple: #9370DB;
    
    /* Gradient definitions */
    --gradient-main: linear-gradient(135deg, 
        #FF6B9D 0%, 
        #FFA07A 16%, 
        #FFD700 33%, 
        #90EE90 50%, 
        #40E0D0 66%, 
        #6495ED 83%, 
        #9370DB 100%);
    
    --gradient-horizontal: linear-gradient(90deg, 
        #FF6B9D, 
        #FFA07A, 
        #FFD700, 
        #90EE90, 
        #40E0D0, 
        #6495ED, 
        #9370DB);
    
    /* Text gradient for headers */
    --gradient-text: linear-gradient(90deg, 
        #FF6B9D, 
        #9370DB);
    
    /* Neutral colors */
    --dark: #2D2D2D;
    --light: #FAFAFA;
    --white: #FFFFFF;
}

/* General body and typography */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Light background */
    color: #343a40; /* Darker text */
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar with gradient accents */
.navbar {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a1a 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-navbar {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

.brand-text h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text .tagline {
    font-size: 0.75rem;
    opacity: 0.8;
    color: var(--gradient-teal);
}

/* Mobile responsive navbar */
@media (max-width: 768px) {
    .logo-navbar {
        height: 40px;
        width: 40px;
    }
    
    .brand-text h1 {
        font-size: 1.2rem;
    }
    
    .brand-text .tagline {
        display: none;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: #e0e7ff; /* Light blueish for user info */
    font-size: 0.9rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    border: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid;
    border-image: var(--gradient-horizontal) 1;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--gradient-horizontal);
    color: white;
    transform: scale(1.02);
}

.btn-secondary {
    background-color: #6b7280; /* Gray */
    color: white;
    border: 1px solid #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563; /* Darker gray */
}

.btn-danger {
    background-color: #dc2626; /* Red */
    color: white;
    border: 1px solid #dc2626;
}

.btn-danger:hover {
    background-color: #b91c1c; /* Darker red */
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 1.1rem;
}

.link-button {
    background: none;
    border: none;
    color: #6366f1;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
}

/* Modals (Auth) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    box-sizing: border-box; /* Ensure padding is included in width */
    max-height: 90vh;
    overflow-y: auto;
}

.tos-modal-content .auth-container {
    max-width: 720px;
    text-align: left;
}

.tos-body {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
    line-height: 1.5;
}

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers horizontally */
    text-align: center; /* Centers text within block elements like h2, p */
}

.auth-container h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #343a40;
    font-size: 1.75rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    width: 100%;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    min-width: 120px;
}

#tosGroup {
    width: 100%;
    text-align: left;
}

#tosGroup .checkbox-label {
    justify-content: flex-start;
    text-align: left;
}

.auth-container form {
    width: 100%; /* Take full width of its flex container */
    max-width: 300px; /* Limit the max width of the form itself */
    margin: 0 auto; /* Center the form if it's narrower than its container */
    display: flex; /* Make form a flex container */
    flex-direction: column; /* Stack form groups vertically */
    align-items: center; /* Center items within the form */
}

.auth-container .form-group {
    width: 100%; /* Ensure form groups take full width within the form */
    margin-bottom: 1rem;
    text-align: left; /* Align labels/inputs to left within their group */
}

.auth-container .form-group label {
    display: block; /* Make label a block element to push input to next line */
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4b5563;
}

.auth-container .form-group label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.auth-container .form-group label.checkbox-label input[type="checkbox"] {
    margin-top: 0;
}

.auth-container .form-group input {
    width: 100%; /* Inputs take full width of their group */
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.3rem;
    font-size: 1rem;
    box-sizing: border-box; /* Include padding/border in element's total width */
}

.auth-container .form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.auth-container button[type="submit"] {
    width: 100%; /* Make submit button full width within the form */
    max-width: 200px; /* Limit its max width */
    margin-top: 1rem;
}

.auth-container .auth-switch {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.auth-container .auth-switch a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.auth-container .auth-switch a:hover {
    text-decoration: underline;
}

.auth-container .error-message {
    color: #dc3545; /* Red for errors */
    font-size: 0.875rem;
    margin-top: 1rem;
}


/* Main content sections */
.main-content {
    padding: 2rem 0;
}

.section {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.section-header::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--gradient-horizontal);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Hero Logo (4x navbar size) */
.hero-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.logo-hero {
    width: 200px;
    height: 200px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .logo-hero {
        width: 150px;
        height: 150px;
    }
}

#selectedStencilPreview {
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.section-header p {
    color: #6c757d;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* Upload Area styles (Applies to both tattoo and skin upload) */
.upload-area {
    border: 2px dashed #ced4da;
    border-radius: 0.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centers horizontally */
    text-align: center; /* Centers text within placeholder */
    cursor: pointer; /* Indicates clickable area */
    transition: border-color 0.3s ease;
}

.upload-area:hover {
    border-color: #6366f1;
    cursor: pointer; /* Ensure pointer cursor on hover */
}

.upload-placeholder svg {
    color: #6366f1;
    margin-bottom: 1rem;
}

.upload-placeholder p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    color: #495057;
}

.upload-placeholder span {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Image Preview */
.image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

/* Prompt Tip Box (for AI idea generator guidance) */
.external-idea-guidance {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa; /* Light grey background */
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    text-align: center; /* Center content within this block */
}

.external-idea-guidance p {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 0.95rem;
}

.external-idea-guidance a.btn {
    margin-top: 0.5rem;
    display: inline-flex; /* Align icon and text */
    align-items: center;
    gap: 0.5rem;
}

.external-idea-guidance .prompt-tip-box {
    background-color: #f0f9ff; /* Light blue background */
    border-left: 4px solid #3b82f6; /* Blue left border */
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 0.375rem; /* Rounded corners */
    color: #1f2937; /* Darker text for readability */
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left; /* Align text within tip box to left for readability */
}

.prompt-tip-box .prompt-tip-header {
    font-weight: 600; /* Semi-bold header */
    color: #1e40af; /* Darker blue for header */
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.prompt-tip-box .prompt-tip-header::before {
    content: '≡ƒÆí'; /* Lightbulb icon */
    margin-right: 0.5rem;
}

.prompt-tip-box .prompt-tip-content {
    margin: 0;
}


/* Drawing Canvas Section */
.drawing-container{
  position:relative;
  width:100%;
  min-height:300px;
  max-height:80vh;
  background:#111;
  overflow:hidden;
  display:flex;
  justify-content:center;
  align-items:center;
}

/* Canvas size controlled by JavaScript to maintain aspect ratio */
#drawingCanvas{
  display:block;
  max-width:100%;
  max-height:80vh;
  touch-action:none;
  user-select:none;
  -webkit-user-drag:none;
}

.drawing-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Credits/Tokens Display */
.credits-info {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-item {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.result-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.result-actions {
    padding: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.image-expiry-warning {
    font-size: 0.85rem;
    color: #92400e;
    padding: 0 1rem 1rem;
    text-align: left;
}

.image-expiry-warning span {
    font-weight: 600;
}

.image-expiry-warning.expired {
    color: #9f1239;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Style Chips */
.style-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.style-chip-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tattoo-of-the-day {
    width: 150px;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tattoo-of-the-day img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tattoo-of-the-day.clickable {
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.tattoo-of-the-day.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.tattoo-of-the-day-title {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    margin-top: 0.5rem;
}

.tattoo-of-the-day-title p {
    margin: 0.2rem 0;
}

.upload-link-container {
    text-align: center;
    margin-top: 1.5rem;
}

.upload-link-container a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.upload-link-container a:hover {
    text-decoration: underline;
}

/* Featured Sketches Section */
.featured-sketches-container {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.featured-scroll-area {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.featured-scroll-area .sketch-card {
    flex: 0 0 180px;
    scroll-snap-align: start;
}

/* Styles List Container (Accordion/Drawer Categories) */
.styles-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.style-category-container {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.style-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background-color: #f8fafc;
    border-bottom: 1px solid transparent;
    transition: background-color 0.2s ease;
}

.style-category-header:hover {
    background-color: #f1f5f9;
}

.style-category-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    flex-shrink: 1;
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.style-category-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.style-category-thumbs img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.style-category-toggle {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.style-category-toggle {
    font-size: 0.9rem;
    color: #64748b;
    transition: transform 0.3s ease;
}

.style-category-container.active .style-category-toggle {
    transform: rotate(180deg);
}

.style-category-container.active .style-category-header {
    border-bottom-color: #e5e7eb;
}

.style-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.style-category-container.active .style-category-content {
    max-height: 2000px; /* Enough to contain content */
}

.sketch-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 1.25rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.sketch-scroll .sketch-card {
    flex: 0 0 180px;
    scroll-snap-align: start;
}

/* Sketch Gallery Grid */
.sketch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.sketch-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.sketch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.sketch-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.sketch-card-info {
    padding: 0.75rem;
    text-align: center;
}

.sketch-card-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #343a40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sketch-card-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
}


/* Artist Grid */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.3rem;
    font-size: 1rem;
    color: #495057;
    background-color: white;
}

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.artist-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portfolio-gallery {
    position: relative;
    width: 100%;
    height: 200px; /* Fixed height for portfolio images */
    overflow: hidden;
}

.portfolio-gallery .portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none; /* Hide all but active */
}

.portfolio-gallery .portfolio-image.active {
    display: block; /* Show active image */
}

.gallery-prev, .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 0.3rem;
    z-index: 10;
}

.gallery-prev {
    left: 0.5rem;
}

.gallery-next {
    right: 0.5rem;
}

.artist-info {
    padding: 1.5rem;
    flex-grow: 1; /* Allow info section to grow */
    display: flex;
    flex-direction: column;
}

.artist-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #343a40;
    font-size: 1.5rem;
}

.artist-location {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.artist-bio {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 1rem;
    flex-grow: 1; /* Allow bio to take available space */
}

.artist-styles {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.style-tag {
    background-color: #e0e7ff;
    color: #3b82f6;
    padding: 0.3rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.artist-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.artist-likes {
    font-size: 0.9rem;
    color: #6c757d;
}


/* Footer */
.footer {
    background-color: #343a40; /* Dark background */
    color: white;
    padding: 2rem 0;
    font-size: 0.9rem;
    margin-top: 3rem;
}

.footer .container {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center content horizontally */
}

.footer-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Centers content horizontally */
    text-align: center; /* Centers text within flex items */
    gap: 2rem; /* Space between sections */
    width: 100%; /* Ensure content takes full width for centering */
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1; /* Allow sections to grow */
    min-width: 180px; /* Minimum width for each section before wrapping */
    max-width: 300px; /* Max width to prevent sections from becoming too wide on large screens */
    margin-bottom: 1rem; /* Space between sections when wrapped */
}

.footer-section h3, .footer-section h4 {
    color: white;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section p, .footer-section ul {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.3rem;
}

.footer-bottom {
    text-align: center; /* Center the copyright text */
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* A subtle separator */
    width: 100%; /* Ensure full width for border */
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
    }
    .nav-brand {
        text-align: center;
    }
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .navbar .nav-menu > .user-info {
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
        order: -1;
    }
    .navbar .nav-menu > .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    .hero-section h2 {
        font-size: 2rem;
    }
    .hero-section .hero-tagline {
        font-size: 1rem;
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
    .artists-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
    }
    
    /* Category/Drawer responsive */
    .style-category-header {
        padding: 0.75rem 1rem;
    }
    
    .style-category-title {
        font-size: 1rem;
    }
    
    .style-category-thumbs img {
        width: 40px;
        height: 40px;
    }
    
    .sketch-scroll {
        padding: 0.75rem 1rem;
    }
    
    .featured-scroll-area .sketch-card,
    .sketch-scroll .sketch-card {
        flex: 0 0 150px;
    }
    
    .sketch-card img {
        height: 150px;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.loading-content {
    text-align: center;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

.artist-info-loading {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    max-width: 300px;
}

.artist-info-loading h4 {
    margin: 0 0 0.5rem 0;
    color: #e0e7ff;
}

.artist-info-loading p {
    margin: 0;
    font-size: 0.9rem;
}

.artist-sketches-grid {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.artist-sketches-grid img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* Loading Logo Styling */
.logo-loading {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer with Logo */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a1a 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-footer {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.footer-text h3 {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
}

.footer-text p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Toast Notification System */
.skintip-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    max-width: 90%;
    min-width: 280px;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.4;
}

.skintip-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.skintip-toast-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-left: 4px solid #fca5a5;
}

.skintip-toast-info {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-left: 4px solid #93c5fd;
}

.skintip-toast-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-left: 4px solid #86efac;
}

.skintip-toast-warning {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-left: 4px solid #fcd34d;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close-btn:hover {
    color: #fff;
}

.toast-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.toast-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
    .skintip-toast {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: translateX(0) translateY(100px);
        max-width: none;
        min-width: auto;
    }
    
    .skintip-toast.show {
        transform: translateX(0) translateY(0);
    }
}
