/* CSS Variablen für Light/Dark Mode */
:root {
    --primary-color: #e91e63;
    --primary-light: #ff6ec7;
    --secondary-color: #ff9a9e;
    --accent-color: #fecfef;
    
    /* RGB Versionen für rgba() */
    --primary-color-rgb: 233, 30, 99;
    --primary-light-rgb: 255, 110, 199;
    --success-color: #28a745;
    --success-color-rgb: 40, 167, 69;
    --danger-color: #dc3545;
    --danger-color-rgb: 220, 53, 69;
    
    /* Light Mode Farben */
    --bg-primary: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-input: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #ddd;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* Dark Mode Farben */
[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #2d1b3d 0%, #1a1a2e 50%, #16213e 100%);
    --bg-secondary: rgba(30, 30, 46, 0.95);
    --bg-card: rgba(40, 40, 60, 0.9);
    --bg-input: #2a2a3e;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #444;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
}

/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: all 0.3s ease;
}

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

/* Header und Navigation */
.navbar {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Dark Mode spezifische Navbar-Styles */
[data-theme="dark"] .navbar {
    background: rgba(30, 30, 46, 0.95);
    border-bottom: 1px solid #444;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-logo a {
    text-decoration: none;
    color: inherit;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 25px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}

/* Dark Mode Toggle */
.theme-toggle {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.theme-toggle .theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.8) 0%, rgba(254, 207, 239, 0.8) 100%);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 500;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.6);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

/* Features Section */
.features {
    padding: 80px 20px;
    background: var(--bg-card);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Auth Styles */
.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.auth-card h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2rem;
}

.auth-card p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-group small {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.slug-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.slug-input:focus-within {
    border-color: var(--primary-color);
}

.slug-prefix {
    background: var(--bg-input);
    padding: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    border-right: 1px solid #ddd;
}

.slug-input input {
    border: none;
    flex: 1;
    padding: 15px;
    font-size: 1rem;
}

.slug-input input:focus {
    outline: none;
    border: none;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(var(--success-color-rgb), 0.1);
    color: var(--success-color);
    border: 1px solid rgba(var(--success-color-rgb), 0.3);
}

.alert-error {
    background: rgba(var(--danger-color-rgb), 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(var(--danger-color-rgb), 0.3);
}

.alert a {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    margin-left: 10px;
}

.alert a:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-container {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 50px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.dashboard-header a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

.dashboard-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.relationship-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border-radius: 15px;
    color: white;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-input);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.quick-action:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.action-icon {
    font-size: 1.5rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-input);
    border-radius: 15px;
}

.stat-icon {
    font-size: 1.5rem;
}

.messages-preview {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.message-preview {
    padding: 15px;
    background: var(--bg-input);
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.no-content {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Couple Page Styles */
.couple-page {
    min-height: calc(100vh - 70px);
}

.couple-header {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.9) 0%, rgba(255, 110, 199, 0.9) 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
}

.couple-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.couple-subtitle {
    font-size: 1.8rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.love-hearts {
    font-size: 2rem;
    margin-top: 20px;
}

.relationship-duration {
    padding: 60px 20px;
    background: var(--bg-secondary);
}

.relationship-duration h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.duration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto 30px auto;
}

.duration-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.duration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.duration-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.duration-label {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.relationship-start {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Gallery Styles */
.gallery-section,
.messages-section {
    padding: 60px 20px;
    background: var(--bg-card);
}

.gallery-section h2,
.messages-section h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.gallery-upload {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-caption {
    padding: 20px;
}

.gallery-caption h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.gallery-caption p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Messages Styles */
.message-form-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.message {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.message-sender {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.message-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.message-content {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Gallery Management */
.gallery-manager {
    padding: 40px 20px;
    min-height: calc(100vh - 70px);
}

.upload-section {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.upload-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
}

.existing-images {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.existing-images h2 {
    color: var(--text-primary);
    margin-bottom: 30px;
}

.gallery-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-management-item {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

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

.image-info {
    padding: 20px;
}

.image-info h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.image-info p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.image-info small {
    color: #999;
    font-size: 0.8rem;
}

.image-actions {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 10px;
}

.back-to-page {
    text-align: center;
    margin-top: 40px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close:hover {
    color: var(--primary-color);
}

#modalImage {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#modalCaption {
    color: white;
    margin-top: 20px;
}

#modalTitle {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#modalDescription {
    font-size: 1rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--bg-card);
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .relationship-stats {
        grid-template-columns: 1fr;
    }
    
    .duration-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .duration-number {
        font-size: 2rem;
    }
    
    .couple-hero h1 {
        font-size: 2.5rem;
    }
    
    .couple-subtitle {
        font-size: 1.3rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-management-grid {
        grid-template-columns: 1fr;
    }
    
    .slug-input {
        flex-direction: column;
    }
    
    .slug-prefix {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .dashboard-container,
    .gallery-manager {
        padding: 20px 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .duration-grid {
        grid-template-columns: 1fr;
    }
    
    .image-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
}
