/* style.css - 1870s Industrial Revolution Theme für Das Handelsimperium */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600&display=swap');

:root {
    /* 1870s Farbpalette */
    --sepia-dark: #2c241b;
    --sepia-medium: #4a3f35;
    --sepia-light: #e8dbce;
    --parchment: #f4ebd8;
    
    --gold-accent: #c5a059;
    --gold-hover: #e0b660;
    --copper-accent: #b87333;
    --silver-accent: #a8a9ad;
    --iron-dark: #3a3f44;
    
    --bg-color: #f4ebd8; /* Dunkles Pergament als Fallback */
    --text-main: #2c241b;
    --text-muted: #5c4e40;
    
    --card-bg: #fffdf7;
    --border-color: #d1bfae;
    
    --error-color: #8b0000; /* Dunkelrot */
    --success-color: #2e4d3a; /* Dunkelgrün */
    
    --shadow-sm: 0 2px 5px rgba(44, 36, 27, 0.15);
    --shadow-md: 0 5px 15px rgba(44, 36, 27, 0.25);
    --shadow-inset: inset 0 0 10px rgba(0,0,0,0.05);

    /* Schriftarten */
    --font-heading: 'Playfair Display', serif;
    --font-ui: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--sepia-dark);
    font-weight: 600;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar im Vintage-Look */
.navbar {
    background-color: var(--sepia-dark);
    background-image: linear-gradient(to bottom, #3a2e22, var(--sepia-dark));
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border-bottom: 2px solid var(--gold-accent);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-accent);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    letter-spacing: 1px;
}

.welcome-text {
    color: var(--parchment) !important;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 3px;
    font-weight: 600;
    font-family: var(--font-ui);
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.btn.primary, .btn-gold {
    background: linear-gradient(to bottom, var(--gold-hover), var(--gold-accent));
    color: var(--sepia-dark);
    border: 1px solid #a38242;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn.primary:hover:not(:disabled), .btn-gold:hover:not(:disabled) {
    background: linear-gradient(to bottom, #ebd197, var(--gold-hover));
    box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.6);
}

.btn.secondary, .btn-silver {
    background: linear-gradient(to bottom, #f0f0f0, var(--silver-accent));
    color: var(--sepia-dark);
    border: 1px solid #888;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn.secondary:hover:not(:disabled), .btn-silver:hover:not(:disabled) {
    background: linear-gradient(to bottom, #ffffff, #c2c3c7);
}

.btn-leather {
    background: linear-gradient(to bottom, var(--sepia-medium), var(--sepia-dark));
    color: var(--gold-accent);
    border: 1px solid #1a1510;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-leather:hover:not(:disabled) {
    background: linear-gradient(to bottom, #5c4e40, var(--sepia-medium));
    color: #ebd197;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.full-width {
    width: 100%;
}

/* Dropdown Menu für Docs */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--sepia-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-family: var(--font-ui);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--sepia-light);
    color: var(--copper-accent);
}

/* Ensure hit area connects the button to the dropdown explicitly */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Forms (Login/Register) Akte/Telegramm Look */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px); /* Minus Navbar */
    background-color: var(--sepia-dark);
    /* Layer 1: Base image, Layer 2: Subtle grain to hide upscaling artifacts */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E"), 
                      url('assets/images/start_bg.png');
    background-size: auto, cover;
    background-position: center, center;
    image-rendering: -webkit-optimize-contrast; /* Helps with scaling blurriness */
    position: relative;
    padding: 2rem;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(44, 36, 27, 0.7); /* Dark overlay */
    z-index: 0;
}

.auth-box {
    background: rgba(255, 253, 247, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    padding: 3rem;
    border-radius: 4px;
    box-shadow: var(--shadow-md), 0 0 0 8px rgba(255, 253, 247, 0.3); /* Rahmen-Illusion */
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    border: 2px solid var(--border-color);
}

.auth-box::after {
    /* Innere Zierlinie */
    content: '';
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--sepia-dark);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(255,255,255,0.5);
    border: 1px solid var(--border-color);
    border-bottom: 2px solid var(--sepia-medium);
    border-radius: 2px;
    font-family: var(--font-ui);
    font-size: 1.1rem;
    color: var(--sepia-dark);
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--gold-accent);
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.2);
}

.auth-switch {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--copper-accent);
    text-decoration: none;
    font-weight: 600;
    font-style: normal;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
    position: relative;
    z-index: 2;
    border-left: 4px solid;
}

.alert.error {
    background-color: #fdf5f5;
    color: var(--error-color);
    border-color: var(--error-color);
}

.alert.success {
    background-color: #f5fdf8;
    color: var(--success-color);
    border-color: var(--success-color);
}

/* ---> Lobby (Startseite Marketing) <--- */
.lobby-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-color: var(--sepia-dark);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E"), 
                      url('assets/images/start_bg.png');
    background-size: auto, cover;
    background-position: center, center;
    image-rendering: -webkit-optimize-contrast;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 4px solid var(--gold-accent);
}

.lobby-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(44,36,27,0.2) 0%, rgba(26,21,16,0.6) 100%);
}

.lobby-content {
    position: relative;
    z-index: 1;
    color: var(--parchment);
    max-width: 800px;
    background: rgba(26, 21, 16, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 3rem;
    border-radius: 6px;
    border: 1px solid var(--gold-accent);
    box-shadow: var(--shadow-md);
}

.lobby-title {
    font-size: 4.5rem;
    color: var(--gold-accent);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 20px rgba(197, 160, 89, 0.3);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.lobby-subtitle {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-style: italic;
    margin-bottom: 3rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.lobby-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.lobby-wrapper {
    max-width: 1000px;
    margin: -4rem auto 2rem auto; /* Zieht das Board etwas über den Hero */
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.lobby-news-board {
    background: rgba(255, 253, 247, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.lobby-news-board h2 {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    color: var(--sepia-dark);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    padding-left: 1.5rem;
    border-left: 3px solid var(--gold-accent);
}

.news-date {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-family: var(--font-heading);
    font-style: italic;
}

.news-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}


/* Dashboard Grid (In-Game Dashboard) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.dashboard-card {
    background: var(--card-bg);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    border-radius: 4px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.dashboard-card.primary-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--sepia-dark), var(--iron-dark));
    color: var(--parchment);
    border: 2px solid var(--gold-accent);
}

.dashboard-card.primary-card h2 {
    color: var(--gold-accent);
}

.dashboard-card.primary-card p {
    color: rgba(244, 235, 216, 0.8);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.action-card h3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--sepia-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 0.5rem;
}

.action-card p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    min-height: 48px;
}
