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

:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #0f0f0f;
    --text-light: #f5f5f5;
    --text-muted: #b0b0b0;
    --accent: #4a5568;
    --overlay: rgba(0, 0, 0, 0.6);
    --spacing-large: 4rem;
    --spacing-medium: 2rem;
    --spacing-small: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    font-size: 18px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-small);
}

/* Hero-Bereich */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('assets/hero-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-dark);
}

@media (min-width: 1024px) {
    .hero {
        background-size: 80% auto;
        background-position: center center;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: clamp(2rem, 8vw, 4rem) clamp(1.5rem, 5vw, 3rem);
    min-height: 100vh;
}

.hero-text-box {
    max-width: 900px;
    width: 100%;
    text-align: left;
}

.hero-alarm {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
    color: #ff4444;
    text-transform: uppercase;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-accent-line {
    width: 60px;
    height: 4px;
    background: #ff4444;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.hero-headline {
    font-size: clamp(3rem, 12vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: clamp(1rem, 3vw, 1.75rem);
    line-height: 0.9;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
}

.hero-headline-line1,
.hero-headline-line2 {
    display: block;
}

.hero-headline-line2 {
    margin-top: -0.1em;
}

.hero-subline {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 400;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    color: #e0e0e0;
    line-height: 1.5;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-text-rotation {
    min-height: 80px;
    position: relative;
    margin-top: clamp(1.5rem, 3vw, 2rem);
}

.rotating-text {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 400;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    width: 100%;
    color: #ffffff;
    line-height: 1.6;
    text-shadow: 
        -1px -1px 0 rgba(0, 0, 0, 0.5),
        1px -1px 0 rgba(0, 0, 0, 0.5),
        -1px 1px 0 rgba(0, 0, 0, 0.5),
        1px 1px 0 rgba(0, 0, 0, 0.5);
}

.rotating-text.active {
    opacity: 1;
    position: relative;
}

@media (min-width: 768px) {
    .hero-content {
        align-items: center;
        padding: clamp(3rem, 10vw, 6rem) clamp(2rem, 6vw, 5rem);
    }
    
    .hero-text-box {
        max-width: 1000px;
    }
}

.hero-text-rotation {
    min-height: 80px;
    position: relative;
}

.rotating-text {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    width: 100%;
    color: #ffffff;
    text-shadow: 
        -1px -1px 0 rgba(0, 0, 0, 0.5),
        1px -1px 0 rgba(0, 0, 0, 0.5),
        -1px 1px 0 rgba(0, 0, 0, 0.5),
        1px 1px 0 rgba(0, 0, 0, 0.5);
}

.rotating-text.active {
    opacity: 1;
}

.rotating-role {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.rotating-cta {
    display: block;
    margin-top: 0.75rem;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 
        -1px -1px 0 rgba(0, 0, 0, 0.5),
        1px -1px 0 rgba(0, 0, 0, 0.5),
        -1px 1px 0 rgba(0, 0, 0, 0.5),
        1px 1px 0 rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .rotating-cta {
        display: block;
        margin-top: 0.75rem;
    }
}

/* Selection Sections */
.selection-section,
.role-section {
    padding: var(--spacing-large) 0;
    background-color: var(--bg-darker);
}

.selection-section h2,
.role-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 300;
    margin-bottom: var(--spacing-medium);
    text-align: center;
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-medium);
    margin-bottom: var(--spacing-medium);
}

@media (min-width: 768px) {
    .selection-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.selection-group label {
    display: block;
    margin-bottom: var(--spacing-small);
    font-size: 1.1rem;
}

.selection-group select {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-dark);
    color: var(--text-light);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.selection-group select:focus {
    outline: none;
    border-color: var(--text-light);
}

.btn-primary {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--text-light);
    color: var(--bg-dark);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 0.8rem 1.5rem;
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-light);
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.role-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-medium);
    margin-bottom: var(--spacing-medium);
}

@media (min-width: 768px) {
    .role-buttons {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-role {
    padding: 2rem;
    background-color: var(--bg-dark);
    color: var(--text-light);
    border: 2px solid var(--accent);
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.btn-role:hover {
    border-color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
}

.hint-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: var(--spacing-small);
}

/* Contacts Section - Mobile First */
.contacts-section {
    position: relative;
    background-color: var(--bg-dark);
    padding-bottom: var(--spacing-large);
}

.contacts-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-medium) var(--spacing-small);
}

.contacts-header {
    margin-bottom: var(--spacing-medium);
}

.contacts-header h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 600;
    margin-bottom: var(--spacing-small);
}

.btn-toggle-country {
    width: 100%;
    padding: 0.875rem;
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-toggle-country:focus {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

.btn-toggle-country:active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Filter & Suche */
.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-small);
    margin-bottom: var(--spacing-medium);
}

@media (min-width: 768px) {
    .filters {
        grid-template-columns: 1.2fr 1.2fr 1.2fr 1.2fr;
    }
}

@media (min-width: 1024px) {
    .filters {
        grid-template-columns: 1.6fr 1.3fr 1.3fr 1.3fr;
    }
}

.search-input,
.filter-select {
    width: 100%;
    padding: 0.875rem;
    min-height: 48px;
    background-color: var(--bg-darker);
    color: var(--text-light);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .filter-select {
        font-size: 0.85rem;
    }
}

@media (min-width: 1024px) {
    .search-input,
    .filter-select {
        font-size: 1rem;
    }
}

.search-input:focus,
.filter-select:focus {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
    border-color: var(--text-light);
}

/* Action Bar */
.action-bar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-small);
    margin-bottom: var(--spacing-medium);
}

.action-bar-top {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-small);
}

.action-bar-bottom {
    width: 100%;
}

.email-buttons-container {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.email-buttons-container .btn-copy-primary {
    flex: 1;
    width: 50%;
}

.btn-select-all-visible {
    width: 100%;
    padding: 0.875rem;
    min-height: 60px;
    height: 60px;
    background-color: var(--text-light);
    color: var(--bg-dark);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-select-all-visible:focus {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

.btn-select-all-visible:active {
    opacity: 0.85;
}

@media (min-width: 768px) {
    .action-bar-top {
        flex-direction: row;
        align-items: stretch;
        gap: var(--spacing-small);
    }
    
    .btn-select-all-visible {
        width: auto;
        min-width: 200px;
        flex: 1;
    }
}

.copy-feedback {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: var(--spacing-medium);
    text-align: center;
    font-size: 0.95rem;
}

/* Text Suggestions Section */
.text-suggestions-section {
    margin-top: var(--spacing-large);
    padding-top: var(--spacing-medium);
}

.btn-show-texts {
    width: 100%;
    padding: 0.875rem;
    min-height: 60px;
    height: 60px;
    background-color: var(--text-light);
    color: var(--bg-dark);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-small);
    margin-bottom: var(--spacing-medium);
}

.btn-show-texts:focus {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

.btn-show-texts:active {
    opacity: 0.85;
}

.text-suggestions-hint-small {
    margin-bottom: var(--spacing-small);
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.text-suggestions-hint-small p {
    margin: 0;
    line-height: 1.5;
}

.text-suggestions-hint-small strong {
    color: var(--text-light);
}

.format-cards-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-small);
}

.format-card {
    flex: 1;
    padding: 0.875rem;
    min-height: 60px;
    height: 60px;
    background-color: var(--bg-darker);
    color: var(--text-light);
    border: 1px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-card:focus {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

.format-card:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.format-card.active {
    border-color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
}

.format-preview-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.4;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .format-cards-container {
        flex-direction: row;
    }
    
    .format-card {
        min-width: 120px;
    }
}

.btn-copy-primary {
    min-height: 60px;
    height: 60px;
    padding: 0.875rem 1rem;
    background-color: var(--text-light);
    color: var(--bg-dark);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.3;
}

.btn-copy-primary:focus {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

.btn-copy-primary:active {
    opacity: 0.85;
}

.btn-copy-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Desktop Anpassungen */
@media (min-width: 768px) {
    .contacts-container {
        padding: var(--spacing-large) var(--spacing-medium);
    }
    
    .contacts-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-medium);
    }
    
    .contacts-header h2 {
        margin-bottom: 0;
    }
    
    .btn-toggle-country {
        width: auto;
        padding: 0.75rem 1.5rem;
    }
    
    .btn-show-texts {
        width: auto;
        min-width: 200px;
    }
    
    .btn-copy-primary {
        min-width: 200px;
    }
    
    .text-suggestions-section {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

.mandatare-list {
    display: grid;
    gap: var(--spacing-small);
    margin-bottom: var(--spacing-large);
}

.mandatar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-small);
    padding: 1rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: border-color 0.3s;
}

.mandatar-item:hover {
    border-color: var(--text-light);
}

.mandatar-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.mandatar-info {
    flex: 1;
}

.mandatar-name {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.mandatar-details {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.mandatar-email {
    font-size: 0.9rem;
    color: var(--text-light);
    word-break: break-all;
}

/* Textvorschläge */
.text-suggestions {
    margin-top: var(--spacing-medium);
}

.text-suggestions h3 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 600;
    margin-bottom: var(--spacing-small);
}

.text-suggestions .hint-text {
    margin-bottom: var(--spacing-medium);
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sentence-list {
    display: grid;
    gap: var(--spacing-small);
    margin-bottom: var(--spacing-medium);
}

.sentence-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-small);
    padding: 1rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: border-color 0.3s;
}

.sentence-item:hover {
    border-color: var(--text-light);
}

.sentence-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.sentence-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
}

.sentence-actions {
    display: flex;
    gap: var(--spacing-small);
    margin-bottom: var(--spacing-medium);
    flex-wrap: wrap;
}

/* Counter */
.counter-section {
    padding: var(--spacing-medium) 0;
    background-color: var(--bg-darker);
    text-align: center;
}

.counter-text {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: var(--spacing-small);
}

.counter-text-detail {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: var(--spacing-large) 0;
    background-color: var(--bg-darker);
    border-top: 1px solid var(--accent);
    text-align: center;
}

.footer p {
    margin-bottom: var(--spacing-small);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-small);
    margin-top: var(--spacing-medium);
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--text-light);
    text-decoration: underline;
}

.footer-separator {
    color: var(--text-muted);
    margin: 0 var(--spacing-small);
}
