:root {
    --primary-color: #1a237e;
    --secondary-color: #0d47a1;
    --accent-color: #00bcd4;
    --danger-color: #d32f2f;
    --success-color: #388e3c;
    --warning-color: #f57c00;
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c2461, #1e3799);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.logo h1 {
    font-size: 2.2rem;
    background: linear-gradient(45deg, var(--accent-color), #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 10px;
}

.security-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.security-layers {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.layer {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

.layer.active {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.2), transparent);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.3);
}

.layer i {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.encryption-area {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.input-section, .output-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.input-group, .output-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-color);
    font-weight: 600;
}

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

textarea:focus, input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

.password-wrapper {
    position: relative;
}

.btn-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
}

.key-management {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.security-options {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--border-radius);
}

.option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-encrypt {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-encrypt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.btn-decrypt {
    background: linear-gradient(135deg, var(--success-color), #4caf50);
    color: white;
}

.btn-decrypt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 142, 60, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.output-actions {
    display: flex;
    gap: 10px;
}

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

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

.encryption-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item {
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.security-dashboard {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

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

.dashboard-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.entropy { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.layers { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.time { background: linear-gradient(135deg, #ffd93d, #ffb347); }
.quantum { background: linear-gradient(135deg, #6a11cb, #2575fc); }

.card-content {
    flex: 1;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00bcd4, #00ffcc);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease;
}

.layer-count {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

.count {
    color: var(--accent-color);
}

.time-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 10px 0;
}

.quantum-status {
    padding: 8px 15px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00ff00;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.warning {
    color: var(--warning-color);
    margin-top: 10px;
    padding: 10px;
    background: rgba(245, 124, 0, 0.1);
    border-radius: var(--border-radius);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.security-architecture {
    padding: 20px;
}

.architecture-layer {
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.security-note {
    padding: 20px;
    background: rgba(0, 188, 212, 0.1);
    border-radius: var(--border-radius);
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .encryption-area {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .action-buttons {
        flex-direction: row;
    }
    
    .key-management {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .security-layers {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .layer {
        min-width: 100px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
  }
