/* Main CSS for Wedding Photo App with Modern Minimal Theme */

/* Variables */
:root {
    /* Primary Color Palette - Soft Dusty Blue */
    --theme-color: #94a3b8;
    --theme-color-light: #cbd5e1;
    --theme-color-dark: #64748b;
    
    /* Secondary Color - Warm Neutral */
    --accent-color: #e2c2b3;
    --accent-color-light: #f1e8e4;
    --accent-color-dark: #c8a99e;
    
    /* Neutrals */
    --text-color: #334155;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    
    /* Feedback Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* UI */
    --shadow: 0 2px 10px rgba(100, 116, 139, 0.1);
    --header-font: 'Cormorant Garamond', serif;
    --body-font: 'Inter', sans-serif;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font);
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--theme-color-dark);
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

a {
    color: var(--theme-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--theme-color-dark);
}

p {
    margin-bottom: 1rem;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
}

button, .button, input[type="submit"] {
    background-color: var(--theme-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-family: var(--body-font);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

button:hover, .button:hover, input[type="submit"]:hover {
    background-color: var(--theme-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.15);
}

button.secondary, .button.secondary {
    background-color: var(--accent-color);
}

button.secondary:hover, .button.secondary:hover {
    background-color: var(--accent-color-dark);
}

button:disabled, .button:disabled, input[type="submit"]:disabled {
    background-color: var(--text-lighter);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--body-font);
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-color);
    background-color: var(--bg-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-help-text {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.input-with-prefix input {
    border: none;
    border-radius: 0;
    flex: 1;
}

.input-with-prefix .input-prefix,
.input-with-prefix .input-suffix {
    padding: 0.75rem 1rem;
    background-color: var(--bg-light);
    color: var(--text-light);
    border-right: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.input-with-prefix .input-suffix {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

/* Checkbox and Radio Styles */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    margin-right: 0.5rem;
}

/* Header */
header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.75rem;
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

.logo a {
    color: var(--theme-color-dark);
    text-decoration: none;
}

.logo .tagline {
    font-family: var(--header-font);
    font-size: 1rem;
    color: var(--accent-color-dark);
    margin-bottom: 0;
    font-style: italic;
}

/* Navigation */
nav {
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    position: relative;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--theme-color-dark);
    transition: var(--transition);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.menu-toggle.active .menu-icon {
    background-color: transparent;
}

.menu-toggle.active .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.active .menu-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    padding: 0.25rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--theme-color);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--theme-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a i {
    margin-right: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--theme-color-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
}

.footer-links li {
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: white;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title h2 {
    font-size: 2.5rem;
    color: var(--theme-color-dark);
    margin-bottom: 0.5rem;
}

.page-title p {
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Cards */
.card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-lighter);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid transparent;
    display: flex;
    align-items: flex-start;
}

.alert i {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: var(--error-color);
    color: var(--error-color);
}

.alert-info {
    background-color: rgba(148, 163, 184, 0.1);
    border-left-color: var(--theme-color);
    color: var(--theme-color-dark);
}

/* Buttons and Icons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--text-color);
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--theme-color-light);
    color: var(--theme-color-dark);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Home Page */
.hero {
    background-color: var(--theme-color-light);
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--theme-color-dark);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero .buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cta-section {
    background-color: var(--accent-color-light);
    padding: 4rem 0;
    text-align: center;
    margin: 3rem 0;
}

.cta-section h2 {
    color: var(--accent-color-dark);
    margin-bottom: 1rem;
}

.feature-section {
    padding: 3rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    color: var(--theme-color);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Mission Page */
.mission-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}

.mission-icon {
    font-size: 3rem;
    color: var(--theme-color);
    margin-bottom: 1.5rem;
}

.mission-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.mission-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent-color-light);
    color: var(--accent-color-dark);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.mission-description {
    margin-bottom: 2rem;
}

/* Upload Form */
.upload-preview {
    margin-bottom: 1.5rem;
    position: relative;
}

.upload-preview img {
    max-height: 300px;
    margin: 0 auto;
    display: block;
    border: 2px dashed var(--border-color);
    padding: 0.5rem;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-dropzone:hover {
    border-color: var(--theme-color);
}

.upload-dropzone.highlight {
    border-color: var(--theme-color);
    background-color: rgba(148, 163, 184, 0.05);
}

.upload-dropzone i {
    font-size: 3rem;
    color: var(--text-lighter);
    margin-bottom: 1rem;
}

.upload-dropzone p {
    color: var(--text-light);
}

/* Gallery */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.gallery-filters select {
    padding: 0.5rem;
    min-width: 150px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    height: 250px;
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.gallery-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.gallery-reactions {
    display: flex;
    gap: 0.5rem;
}

.gallery-reactions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
    color: var(--text-color);
    transition: var(--transition);
}

.pagination-link:hover,
.pagination-link.active {
    background-color: var(--theme-color);
    color: white;
}

/* QR Code Scanner */
.qr-scanner {
    max-width: 500px;
    margin: 0 auto;
}

#qr-reader {
    width: 100%;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Leaderboard */
.leaderboard {
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--theme-color-dark);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tbody tr:hover {
    background-color: var(--bg-light);
}

.leaderboard-rank {
    width: 60px;
    text-align: center;
}

.rank-1, .rank-2, .rank-3 {
    font-weight: 700;
}

.rank-1 {
    color: #fbbf24; /* gold */
}

.rank-2 {
    color: #94a3b8; /* silver */
}

.rank-3 {
    color: #b45309; /* bronze */
}

/* Achievements */
.achievement-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-radius: 20px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.achievement-badge i {
    margin-right: 0.5rem;
    color: var(--theme-color);
}

/* Auth forms */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.auth-form .form-group:last-child {
    margin-bottom: 0;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.terms-checkbox {
    font-size: 0.875rem;
    color: var(--text-light);
}

.create-event-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Empty states */
.empty-gallery,
.empty-leaderboard,
.empty-photos {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    color: var(--theme-color-light);
    margin-bottom: 1.5rem;
}

/* Profile */
.profile-card {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    padding: 2rem;
    text-align: center;
    background-color: var(--theme-color-light);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.profile-icon {
    font-size: 4rem;
    color: var(--theme-color-dark);
    margin-bottom: 1rem;
}

.profile-name {
    margin-bottom: 0.5rem;
}

.profile-qr {
    margin-top: 1.5rem;
}

.profile-qr img {
    width: 150px;
    height: 150px;
    margin: 0 auto 0.5rem;
    background-color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.qr-code-text {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-light);
}

.profile-body {
    padding: 2rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    text-align: center;
}

.stat-item {
    flex: 1;
    padding: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-color-dark);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.profile-achievements,
.profile-photos {
    margin-bottom: 2rem;
}

.profile-achievements h4,
.profile-photos h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-footer {
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
}

.modal-caption {
    padding: 1rem;
    text-align: center;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

/* Legal pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h2 {
    margin-bottom: 1rem;
    color: var(--theme-color-dark);
}

.legal-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.legal-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style: disc;
}

.legal-section ul li {
    margin-bottom: 0.5rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--bg-color);
        box-shadow: var(--shadow);
        padding: 1rem;
        border-radius: var(--border-radius);
        flex-direction: column;
        align-items: flex-start;
        width: 200px;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.5rem 0;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo, .footer-links {
        margin-bottom: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .gallery-controls {
        flex-direction: column;
    }
    
    .gallery-filters {
        margin-bottom: 1rem;
    }
    
    .hero .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero .button {
        width: 100%;
        max-width: 300px;
        margin-bottom: 0.5rem;
    }
    
    .profile-stats {
        flex-wrap: wrap;
    }

    .stat-item {
        flex: 0 0 50%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .page-title h2 {
        font-size: 1.75rem;
    }
    
    .mission-card {
        padding: 1.5rem 1rem;
    }
    
    .mission-title {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 200px;
    }
}