/* Specific styles for the name generator page */

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

/* Modern Generator Header */
.generator-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-light, #4a8ede) 0%, var(--primary, #2c6ecb) 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(44, 110, 203, 0.2);
    position: relative;
    overflow: hidden;
}

.generator-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.generator-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.generator-header .description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Generator Panel */
.generator-panel {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-end;
    /* Align inputs/buttons to the bottom */
}

.control-group {
    flex: 1 1 300px;
    /* Allow growing and shrinking, set decent base width */
    min-width: 280px;
    /* Prevent squishing */
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color, #333);
    font-size: 0.95rem;
}

/* Modern Button Toggles */
.button-toggle {
    display: flex;
    flex-wrap: wrap;
    /* Allow buttons to wrap if needed */
    background: #f0f2f5;
    border-radius: 12px;
    padding: 5px;
    gap: 5px;
    width: 100%;
    /* Ensure full width of container */
}

.button-toggle input[type="radio"] {
    display: none;
}

.button-toggle .toggle-btn {
    flex: 1 1 auto;
    /* Allow growing and shrinking */
    min-width: 100px;
    /* Ensure buttons don't get too small */
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    white-space: nowrap;
    /* Prevent text wrapping inside button */
}

.button-toggle input[type="radio"]:checked+.toggle-btn {
    background: white;
    color: var(--primary, #2c6ecb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* Force Country selector to take full width on smaller screens or if crowded */
.control-group:has(input[name="country"]) {
    flex: 2 1 400px;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary, #2c6ecb), var(--primary-dark, #205bb0));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(44, 110, 203, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 110, 203, 0.4);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Bank Selectors */
.bank-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-color, #333);
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

.bank-select:focus {
    border-color: var(--primary, #2c6ecb);
    box-shadow: 0 0 0 3px rgba(44, 110, 203, 0.1);
    outline: none;
    background-color: white;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Result Card Improvements */
.identity-card {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease-out forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure equal height in grid */
}

.identity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.identity-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #888;
}

.identity-name h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color, #333);
}

.identity-name .gender-icon {
    font-size: 0.9rem;
    color: #888;
    margin-left: 5px;
}

.info-group {
    margin-bottom: 15px;
    width: 100%;
}

.info-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
    display: block;
}

.info-value {
    font-size: 0.95rem;
    /* Slightly smaller for better fit */
    color: var(--text-color, #333);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    word-break: break-all;
    /* Prevent overflow */
}

.copy-btn {
    background: none;
    border: none;
    color: var(--primary, #2c6ecb);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.7;
    flex-shrink: 0;
    /* Prevent button shrinking */
    margin-left: 8px;
}

.copy-btn:hover {
    background: rgba(44, 110, 203, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

/* Dark Mode Support */
:root[data-theme="dark"] .generator-panel,
:root[data-theme="dark"] .identity-card {
    background: #2d2d2d;
    border-color: #404040;
}

:root[data-theme="dark"] .button-toggle {
    background: #404040;
}

:root[data-theme="dark"] .button-toggle input[type="radio"]:checked+.toggle-btn {
    background: #2d2d2d;
    color: white;
}

:root[data-theme="dark"] .info-value {
    background: #363636;
    color: #e0e0e0;
    border-color: #404040;
}

:root[data-theme="dark"] .info-label {
    color: #aaa;
}

:root[data-theme="dark"] .identity-name h3 {
    color: white;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }

    .generator-header {
        padding: 30px 15px;
    }

    .generator-header h1 {
        font-size: 2rem;
    }
}