/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8B4513;
    --primary-dark: #654321;
    --secondary: #D2B48C;
    --accent: #CD853F;
    --light: #FAF0E6;
    --dark: #2C1810;
    --text: #333333;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: linear-gradient(135deg, var(--light) 0%, #f8f4f0 100%);
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--secondary);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover {
    color: var(--primary);
    background: var(--secondary);
    transform: translateY(-2px);
}

nav ul li a.active {
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.8) 0%, 
        rgba(210, 180, 140, 0.8) 50%, 
        rgba(250, 240, 230, 0.9) 100%),
        url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.btn-small {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.btn-danger:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
}

/* Sections */
section {
    padding: 5rem 0;
}

.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
}

/* Painting Grid */
.paintings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.painting-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(210, 180, 140, 0.3);
    position: relative;
}

.painting-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(139, 69, 19, 0.03));
    opacity: 0;
    transition: var(--transition);
}

.painting-card:hover::before {
    opacity: 1;
}

.painting-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.painting-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.painting-card:hover img {
    transform: scale(1.05);
}

.painting-info {
    padding: 2rem;
    position: relative;
}

.painting-info h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
}

.painting-info p {
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    margin: 1rem 0;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--light);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: var(--secondary);
    border-radius: 20px;
    z-index: -1;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-image:hover img {
    transform: rotate(-2deg) scale(1.02);
}

.about-text h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.about-text h3 {
    color: var(--primary);
    margin: 2.5rem 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.about-text ul {
    margin-left: 1.5rem;
    list-style: none;
}

.about-text ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 2rem;
}

.about-text ul li::before {
    content: '🎨';
    position: absolute;
    left: 0;
    top: 0;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(210, 180, 140, 0.3);
}

.contact-details {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--secondary);
}

.contact-details h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.contact-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-details strong {
    color: var(--primary);
    min-width: 80px;
}

/* Forms */
.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--secondary);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Alerts */
.alert {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 5px solid;
    box-shadow: var(--shadow);
}

.alert.success {
    background: #f0fff4;
    color: #22543d;
    border-left-color: #38a169;
}

.alert.error {
    background: #fff5f5;
    color: #742a2a;
    border-left-color: #e53e3e;
}

.alert.info {
    background: #ebf8ff;
    color: #1a365d;
    border-left-color: #3182ce;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid rgba(210, 180, 140, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 1.5rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.data-table th,
.data-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(210, 180, 140, 0.3);
}

.data-table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

.data-table tr:hover {
    background: rgba(210, 180, 140, 0.1);
}

.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--secondary);
}

.actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: 700;
}

/* Purchase Page */
.purchase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.painting-details {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(210, 180, 140, 0.3);
}

.painting-details img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, var(--secondary), var(--accent));
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        padding: 1rem 0;
        border-radius: 0 0 20px 20px;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0;
        border-bottom: 1px solid rgba(210, 180, 140, 0.3);
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav ul li a {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-grid,
    .contact-grid,
    .purchase-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .paintings-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .login-form {
        padding: 2rem;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.loading {
    animation: pulse 2s infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--accent));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--primary-dark), var(--primary));
}


/* Admin Header Styles */
.admin-header .logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.admin-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.admin-header nav ul li a {
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
}

/* Make admin pages more compact */
.admin-content .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.admin-content section {
    padding: 2rem 0;
}


.no-paintings {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.no-paintings h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--secondary);
}

/* Fallback for missing images */
.painting-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.painting-card div[style*="background: #f0f0f0"] {
    width: 100%;
    height: 280px;
    font-weight: bold;
}

/* Header actions */
.header-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Button variants */
.btn-warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.btn-warning:hover {
    background: linear-gradient(45deg, #e67e22, #d35400);
}

.btn-success {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.btn-success:hover {
    background: linear-gradient(45deg, #229954, #27ae60);
}

/* Status badges */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-deleted {
    background: #f8d7da;
    color: #721c24;
}