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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

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

header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #e74c3c;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 80px;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    z-index: 1001;
}

.logo span {
    color: #e74c3c;
}

/* Hamburger Menu Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
}

.nav-links a {
    color: #2c3e50;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
    padding-bottom: 2rem;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 2rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.content-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.two-column {
    grid-template-columns: 1fr 1fr;
}

.three-column {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.12);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.controls-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-select, .form-input, .form-textarea {
    width: 100%;
    max-width: 300px;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    background: white;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-input {
    max-width: none;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

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

.btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #c0392b;
}

.btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.rankings-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.ranking-item:hover {
    background: #f8f9fa;
}

.ranking-item:last-child {
    border-bottom: none;
}

.rank-number {
    font-weight: bold;
    color: #e74c3c;
    margin-right: 1rem;
    font-size: 1.1rem;
    min-width: 30px;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.player-details {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.player-projection {
    font-weight: 600;
    color: #27ae60;
    font-size: 1rem;
}

.text-center { text-align: center; }
.text-muted { color: #7f8c8d; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.api-config {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
}

.status-indicator.connected {
    background: #28a745;
}

.generated-name-card {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.generated-name-card:hover {
    border-color: #e74c3c;
    transform: translateY(-3px);
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 20px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin: 1rem 0;
}

.example-btn {
    background: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-btn:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    background-color: #f1f3f4;
}

footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    font-size: 0.9rem;
    line-height: 1.6;
}

.copyright {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.creator {
    color: #bdc3c7;
    font-size: 0.85rem;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    nav {
        padding: 0.8rem 0;
        min-height: 70px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    /* Show hamburger menu on mobile */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide regular nav links and make them collapsible */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-links.active {
        max-height: 400px;
    }
    
    .nav-links a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f8f9fa;
        border-bottom-width: 1px;
        font-size: 1rem;
        text-align: left;
        min-height: 60px;
        display: flex;
        align-items: center;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background: #f8f9fa;
        border-left: 4px solid #e74c3c;
        border-bottom-color: #f8f9fa;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    main {
        margin-top: 70px;
    }
    
    /* Hero section adjustments */
    .hero {
        padding: 60px 0;
        margin-bottom: 40px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Section adjustments */
    .section-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Grid adjustments */
    .two-column,
    .three-column {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Card adjustments */
    .card-header,
    .card-body {
        padding: 1.2rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    /* Controls adjustments */
    .controls-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-select, 
    .form-input, 
    .form-textarea {
        max-width: none;
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Rankings adjustments */
    .ranking-item {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .rank-number {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .player-info {
        width: 100%;
    }
    
    .player-projection {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
    
    /* Footer adjustments */
    footer {
        padding: 1.5rem 0;
    }
    
    .footer-content {
        font-size: 0.85rem;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card-header,
    .card-body,
    .controls-section {
        padding: 1rem;
    }
}