* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.selection {
    margin-bottom: 30px;
}

.selection h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.option-btn {
    padding: 12px 24px;
    font-size: 1.1em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #333;
    font-weight: 600;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.option-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.input-section {
    margin-bottom: 30px;
}

.input-section input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-section input:focus {
    border-color: #667eea;
}

.detect-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-top: 20px;
}

.detect-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.detect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-section {
    margin-top: 30px;
    padding: 20px;
    border-radius: 15px;
    background: #f8f9fa;
    display: none;
}

.result-section.show {
    display: block;
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-title {
    color: #28a745;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-name {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.result-gender {
    font-size: 1.8em;
    font-weight: bold;
    margin: 10px 0;
}

.male { color: #007bff; }
.female { color: #e83e8c; }

.disclaimer {
    margin-top: 30px;
    color: #6c757d;
    font-size: 0.9em;
    font-style: italic;
}

.loading {
    display: none;
    margin: 20px 0;
}

.loading.show {
    display: block;
}

.loading-text {
    color: #667eea;
    font-size: 1.1em;
    margin: 10px 0;
    min-height: 24px;
}

.dot-animation {
    display: inline-block;
}

.dot {
    animation: blink 1.4s infinite both;
    opacity: 0;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .options {
        flex-direction: column;
        align-items: center;
    }
    
    .option-btn {
        width: 100%;
        max-width: 250px;
    }
}