/**
 * Random Username Generator - Styles
 * Version: 2.0
 */

/* Container */
.rung-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 0 15px;
}

.rung-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Generate Button */
.rung-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rung-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.rung-button:active {
    transform: translateY(0);
}

.rung-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.rung-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Spinner */
.rung-spinner {
    display: inline-block;
    animation: rung-spin 1s linear infinite;
    font-size: 20px;
}

@keyframes rung-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Result Container */
.rung-result {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    animation: rung-slide-in 0.3s ease;
}

@keyframes rung-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rung-result-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.rung-username {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    word-break: break-word;
    font-family: 'Courier New', Courier, monospace;
    background: #ffffff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Copy Button */
.rung-copy-button {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rung-copy-button:hover {
    background: #667eea;
    color: #ffffff;
}

.rung-copy-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.rung-copy-button.rung-copied {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

/* Error Message */
.rung-error {
    margin-top: 20px;
    padding: 15px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
    text-align: left;
    animation: rung-slide-in 0.3s ease;
}

/* Responsive Design */
@media (max-width: 600px) {
    .rung-wrapper {
        padding: 20px;
    }

    .rung-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .rung-username {
        font-size: 24px;
    }

    .rung-copy-button {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .rung-wrapper {
        background: #1f2937;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .rung-result {
        background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    }

    .rung-result-label {
        color: #d1d5db;
    }

    .rung-username {
        background: #111827;
        color: #f3f4f6;
    }

    .rung-copy-button {
        background: #374151;
        color: #818cf8;
        border-color: #818cf8;
    }

    .rung-copy-button:hover {
        background: #818cf8;
        color: #ffffff;
    }
}

/* Accessibility */
.rung-button:focus-visible,
.rung-copy-button:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
