/* Main Styles */
:root {
    --primary-color: #FF9900;
    --primary-dark: #e68900;
    --secondary-color: #232F3E;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-light: #666;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

a {
   color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Header */
.header {
    background: var(--secondary-color);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: white;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 20px;
}

/* Main Content */
.main-content {
    padding: 2.5rem;
}

.description {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.description h2 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Form */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

input, select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

.region-option {
    display: flex;
    justify-content: space-between;
}

.region-code {
    font-weight: normal;
    color: var(--text-light);
}

.region-name {
    font-weight: 600;
}

.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 153, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn i {
    font-size: 1.2rem;
}

/* Results */
.result-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

.result-container.show {
    display: block;
}

.result-box {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.password-display {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 1rem;
    border-radius: 5px;
    word-break: break-all;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    font-size: 14px;
    line-height: 1.4;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.btn-copy, .btn-new {
    flex: 1;
    padding: 10px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-copy {
    background: var(--success-color);
    color: white;
}

.btn-copy:hover {
    background: #218838;
}

.btn-new {
    background: #6c757d;
    color: white;
}

.btn-new:hover {
    background: #5a6268;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: none;
}

.alert.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.security-note {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .header, .main-content {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
}

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

/* Loading spinner */
.spinner {
    display: none;
    text-align: center;
    margin: 1rem 0;
}

.spinner.show {
    display: block;
}

.spinner-icon {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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