/* Modern webpage styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #F5E6A3 0%, #E8D5B7 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container for main content */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    margin-top: 50px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #8B7355;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #D4B996, #C4A484);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 1.7rem;
    font-weight: 600;
    color: #8B7355;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #D4B996, #C4A484);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #555;
    text-align: center;
}

/* Navigation links styling */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
    align-items: center;
}

a {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(45deg, #D4B996, #C4A484);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 185, 150, 0.3);
    min-width: 300px;
    text-align: center;
    font-size: 1rem;
}

a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 185, 150, 0.4);
    background: linear-gradient(45deg, #C4A484, #D4B996);
}

a:active {
    transform: translateY(-1px);
}

/* Special styling for external links */
a[href^="http"]:after {
    content: " ↗";
    font-size: 0.9em;
    opacity: 0.7;
}

/* Contact section */
.contact {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
    text-align: center;
}

.contact a {
    background: linear-gradient(45deg, #B8A082, #A6926B);
    min-width: auto;
    padding: 12px 25px;
    font-size: 0.95rem;
}

.contact a:hover {
    background: linear-gradient(45deg, #A6926B, #B8A082);
    box-shadow: 0 8px 20px rgba(184, 160, 130, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 25px;
        margin-top: 20px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    a {
        min-width: 250px;
        padding: 12px 25px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    a {
        min-width: 200px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Auto-detect user's device theme preference - only when no manual toggle is used */
@media (prefers-color-scheme: dark) {
    body:not(.dark-mode):not(.light-mode) {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #e0e0e0;
    }
    
    body:not(.dark-mode):not(.light-mode) .container {
        background: rgba(40, 40, 40, 0.95);
        color: #e0e0e0;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }
    
    body:not(.dark-mode):not(.light-mode) h1 {
        color: #C4A484;
        background: linear-gradient(45deg, #C4A484, #D4B996);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    body:not(.dark-mode):not(.light-mode) p {
        color: #c0c0c0;
    }
    
    body:not(.dark-mode):not(.light-mode) a {
        background: rgba(40, 40, 40, 0.8);
        color: #C4A484;
        border: 2px solid #555;
    }
    
    body:not(.dark-mode):not(.light-mode) a:hover {
        background: #C4A484;
        color: white;
        border-color: #C4A484;
    }
    
    body:not(.dark-mode):not(.light-mode) .nav-links a {
        background: rgba(40, 40, 40, 0.8);
        color: #C4A484;
        border: 2px solid #555;
    }
    
    body:not(.dark-mode):not(.light-mode) .nav-links a:hover {
        background: #C4A484;
        color: white;
        border-color: #C4A484;
    }
    
    body:not(.dark-mode):not(.light-mode) .contact {
        border-top: 2px solid #555;
        color: #c0c0c0;
    }
    
    body:not(.dark-mode):not(.light-mode) .contact a {
        background: rgba(40, 40, 40, 0.8);
        color: #C4A484;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    body:not(.dark-mode):not(.light-mode) .contact a:hover {
        background: linear-gradient(45deg, #555, #666);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }
    
    body:not(.dark-mode):not(.light-mode) button, 
    body:not(.dark-mode):not(.light-mode) .generate-btn {
        background: rgba(40, 40, 40, 0.8);
        color: #C4A484;
        border: 2px solid #555;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    body:not(.dark-mode):not(.light-mode) button:hover, 
    body:not(.dark-mode):not(.light-mode) .generate-btn:hover {
        background: #C4A484;
        color: white;
        border-color: #C4A484;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
        transform: translateY(-3px);
    }
    
    body:not(.dark-mode):not(.light-mode) #output_bradford_17 {
        background: rgba(60, 60, 60, 0.5);
        border: 2px solid rgba(139, 115, 85, 0.3);
        color: #e0e0e0;
    }
    
    body:not(.dark-mode):not(.light-mode) .content {
        color: #e0e0e0;
    }
    
    body:not(.dark-mode):not(.light-mode) .content h3 {
        color: #C4A484;
    }
    
    body:not(.dark-mode):not(.light-mode) ::selection {
        background: rgba(139, 115, 85, 0.4);
        color: #F4E4C1;
    }
}

/* Selection styling */
::selection {
    background: rgba(212, 185, 150, 0.3);
    color: #8B7355;
}

/* Content section styling */
.content {
    margin: 30px 0;
    text-align: center;
}

.content h3 {
    color: #8B7355;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Button styling */
button {
    background: linear-gradient(45deg, #D4B996, #C4A484);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 185, 150, 0.3);
    margin-bottom: 20px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 185, 150, 0.4);
    background: linear-gradient(45deg, #C4A484, #D4B996);
}

button:active {
    transform: translateY(-1px);
}

/* Generate button class */
.generate-btn {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(45deg, #D4B996, #C4A484);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 185, 150, 0.3);
    min-width: 200px;
    text-align: center;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 185, 150, 0.4);
    background: linear-gradient(45deg, #C4A484, #D4B996);
}

.generate-btn:active {
    transform: translateY(-1px);
}

/* Output div styling */
#output_bradford_17 {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 2px solid rgba(212, 185, 150, 0.2);
    min-height: 50px;
}