:root {
    --primary: #2a2d57;
    --secondary: #4a4d8c;
    --accent: #0b00dd;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #000000;
    color: var(--light);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
}

header h1 img {
    height: 40px;
}

.subtitle {
    font-size: 1.1rem;
    color: #b8b8d1;
    max-width: 600px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 600;
    min-width: 150px;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab.active {
    background: var(--accent);
    color: white;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    color: var(--dark);
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 1.5rem;
}

.card-title i {
    color: var(--accent);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.flex-group {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:not(.secondary) {
    background: var(--accent);
    color: white;
}

button:not(.secondary):hover {
    background: #5a52e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

button.secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

button.secondary:hover {
    background: rgba(108, 99, 255, 0.1);
}

.result-area {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    min-height: 60px;
    border: 1px dashed #ddd;
    word-break: break-all;
    font-family: monospace;
    position: relative;
}

.result-area.success {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.05);
}

.result-area.error {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.05);
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
}

.copy-btn:hover {
    background: var(--primary);
}

.algorithm-info {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 5px;
    font-style: italic;
}

.file-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.history-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item .time {
    font-size: 0.8rem;
    color: var(--gray);
}

.history-item .operation {
    font-weight: 600;
    color: var(--primary);
}

.history-item .result {
    font-family: monospace;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clear-history {
    margin-top: 20px;
    background: var(--danger);
    color: white;
}

.clear-history:hover {
    background: #c82333;
}

.security-meter {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.security-level {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.security-weak {
    background: var(--danger);
    width: 30%;
}

.security-medium {
    background: var(--warning);
    width: 60%;
}

.security-strong {
    background: var(--success);
    width: 90%;
}

.security-very-strong {
    background: var(--success);
    width: 100%;
}

.security-label {
    font-size: 0.8rem;
    margin-top: 5px;
    text-align: right;
}

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.strength-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e9ecef;
}

.strength-dot.active {
    background: var(--success);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    padding: 0;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 45px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .flex-group {
        flex-direction: column;
    }
    
    .tab {
        min-width: 120px;
    }
}