/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.header-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.header-link:hover {
    opacity: 0.8;
}

/* User Menu Styles */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.welcome-text {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.member-since {
    font-size: 0.8rem;
    opacity: 0.7;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.profile-btn, .logout-btn, .home-btn, .create-profile-btn, .login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.profile-btn:hover, .logout-btn:hover, .home-btn:hover, .create-profile-btn:hover, .login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.create-profile-btn {
    background: rgba(46, 204, 113, 0.2);
}

.create-profile-btn:hover {
    background: rgba(46, 204, 113, 0.3);
}

.login-btn {
    background: rgba(52, 152, 219, 0.2);
}

.login-btn:hover {
    background: rgba(52, 152, 219, 0.3);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .user-info {
        align-items: center;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-text {
    font-size: 1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-item h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.feature-item p {
    color: #666;
    font-size: 0.9rem;
}

/* Button Styles */
.centered-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.centered-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.pulse-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

.button-icon {
    font-size: 1.2rem;
}

/* Main Content Area */
main {
    flex: 1;
    padding: 0.25rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.name {
    text-align: center;
    margin-bottom: 0.25rem;
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #2c3e50;
    font-weight: 500;
}

/* Main Layout Container */
.main-layout {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
    gap: 0.5rem;
    height: 100%;
    overflow: hidden;
}

/* Image Container */
.container3 {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#resizable-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

/* Clothing Items Grid */
.clothing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    overflow-y: auto;
    padding: 1rem;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f1f1f1;
}

.box {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.box h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.box p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.buy-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.buy-link:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Button Container */
.special-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: clamp(1rem, 3vw, 2rem) 0;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: clamp(0.5rem, 2vw, 1rem);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.social-btn {
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.facebook {
    background: #1877f2;
}

.twitter {
    background: #1da1f2;
}

.pinterest {
    background: #e60023;
}

.instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.tiktok {
    background: #000000;
    position: relative;
    overflow: hidden;
}

.tiktok::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #00f2ea, #ff0050);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tiktok:hover::before {
    opacity: 0.3;
}

@media (max-width: 768px) {
    .social-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .social-links {
        gap: 10px;
    }
}

/* Explore button */
.explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: #f8f9fa;
}

.explore-btn:hover {
    color: #2980b9;
    transform: translateX(5px);
    background: #e9ecef;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .container3 {
        height: 40vh;
        min-height: 300px;
    }

    .clothing-grid {
        height: 60vh;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-layout {
        gap: 0.5rem;
    }

    .container3 {
        height: 35vh;
        min-height: 250px;
    }
    
    .clothing-grid {
        height: 65vh;
        grid-template-columns: 1fr;
    }
}

/* Custom scrollbar */
.clothing-grid::-webkit-scrollbar {
    width: 6px;
}

.clothing-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.clothing-grid::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.clothing-grid::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Loading state */
.box.loading {
    opacity: 0.7;
    pointer-events: none;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 0.5; }
    100% { opacity: 0.7; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.container1 {
    display: flex;
    justify-content: space-between;
}

.home-link {
    font-size: 30px;
    text-align: left;
    color: Black;
    font-weight: bold;
}

.actual-fit-link {
    font-size: 30px;
    text-align: right;
    color: Black;
    font-weight: bold;
}

.home-link, .actual-fit-link {
    border: 2px solid black;
    padding: 8px 12px;
    text-decoration: none;
    color: black;
}

/* Add specific styles for each clothing type */
.box.headwear {
    border-left: 4px solid #e74c3c;
}

.box.topwear {
    border-left: 4px solid #3498db;
}

.box.bottomwear {
    border-left: 4px solid #2ecc71;
}

.box.shoewear {
    border-left: 4px solid #f1c40f;
}

.box.accessory {
    border-left: 4px solid #9b59b6;
}

/* Add smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Optimize performance */
.box, .container3, .explore-btn {
    will-change: transform;
    transform: translateZ(0);
}

/* Save Outfit Button */
.save-outfit-container {
    text-align: center;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.save-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.save-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.save-btn.saved {
    background-color: #2196F3;
    cursor: default;
}

.save-btn.saved:hover {
    transform: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.save-status {
    font-size: 14px;
    min-height: 20px;
    transition: all 0.3s ease;
}

.save-status.saved {
    color: #4CAF50;
}

.save-status.error {
    color: #f44336;
}

/* Profile Page Styles */
.profile-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.profile-section h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.saved-outfits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.saved-outfit-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.saved-outfit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.saved-outfit-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.outfit-info {
    padding: 1rem;
}

.outfit-info h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.save-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.outfit-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.outfit-item {
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-name {
    color: #2c3e50;
}

.item-type {
    color: #666;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .saved-outfits-grid {
        grid-template-columns: 1fr;
    }
    
    .saved-outfit-card img {
        height: 250px;
    }
}

.outfit-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.outfit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.outfit-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.outfit-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.outfit-info {
    padding: 12px;
}

.outfit-info h3 {
    margin: 0 0 4px;
    font-size: 1.1em;
    color: #333;
}

.save-date {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.delete-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.outfit-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.outfit-image {
    margin: 20px 0;
    text-align: center;
}

.outfit-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.outfit-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.outfit-actions {
    margin-top: 20px;
    text-align: center;
}

.outfit-actions .delete-btn {
    position: static;
    padding: 8px 16px;
    font-size: 1em;
}

@media (max-width: 768px) {
    .saved-outfits-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .outfit-card img {
        height: 150px;
    }
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .logo {
        height: 32px;
    }
}

.save-section {
    margin-top: 2rem;
    text-align: center;
}

.save-button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.save-button:hover {
    background-color: #45a049;
}

.guest-message {
    margin-top: 2rem;
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.guest-message a {
    color: #007bff;
    text-decoration: none;
}

.guest-message a:hover {
    text-decoration: underline;
}

/* Success and Error Messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    text-align: center;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    text-align: center;
}

.save-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.save-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.save-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.save-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

