:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #0f3460;
    --highlight: #e94560;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --text: #f1f1f1;
    --text-muted: #bdc3c7;
    --border: #2d4059;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

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

header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    position: relative;
}

.logo {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--highlight), #ff7b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.version-badge {
    position: absolute;
    top: 20px;
    right: 0;
    background: var(--highlight);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.card {
    background-color: var(--secondary);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--highlight);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.card-title i {
    margin-right: 12px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: normal;
}

.password-toggle {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--highlight);
}

textarea, input[type="password"] {
    width: 100%;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus, input[type="password"]:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

textarea {
    min-height: 300px;
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.5;
}

.password-strength {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 10px;
}

.strength-bar {
    height: 5px;
    background: var(--danger);
    border-radius: 3px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}

.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--highlight), #ff7b00);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background-color: var(--accent);
    color: white;
}

.btn-secondary:hover {
    background-color: #1a3a6e;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

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

.btn-info:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.loading-container {
    text-align: center;
    padding: 40px;
    display: none;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--highlight);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.security-badge {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.result-container {
    display: none;
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

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

.result-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--highlight);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.result-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: normal;
}

.result-code {
    background-color: #0d0d1a;
    border-radius: 8px;
    padding: 25px;
    overflow-x: auto;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    position: relative;
    max-height: 500px;
    overflow-y: auto;
}

.result-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight), #ff7b00);
    border-radius: 8px 8px 0 0;
}

.result-code pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.feature {
    background-color: var(--secondary);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight), #ff7b00);
}

.feature:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--highlight);
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text);
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.security-info {
    background-color: var(--secondary);
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
    border: 1px solid var(--border);
}

.security-info h3 {
    color: var(--highlight);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success);
}

.security-item i {
    font-size: 1.1rem;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer .security-badge {
    margin-top: 10px;
    font-size: 0.8rem;
}

.notification {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1) 0%, rgba(255, 123, 0, 0.1) 100%);
    border-left: 4px solid var(--highlight);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
}

.notification i {
    margin-right: 10px;
    color: var(--highlight);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-left: 4px solid var(--warning);
    color: var(--warning);
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .form-actions, .result-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .features, .security-features {
        grid-template-columns: 1fr;
    }
    
    .result-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .version-badge {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
}
