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

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e6e6e6;
    min-height: 100vh;
    padding: 20px;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.subtitle {
    color: #a5b4cb;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.app-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.card {
    background: rgba(25, 25, 45, 0.8);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #4cc9f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    font-size: 1.3rem;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #b8c1ec;
}

textarea, input, select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(10, 10, 20, 0.7);
    color: #e6e6e6;
    font-size: 1rem;
    transition: all 0.3s;
}

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: monospace;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

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

.key-box {
    background: rgba(10, 10, 20, 0.5);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #4361ee;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.radio-option {
    flex: 1;
    min-width: 200px;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(10, 10, 20, 0.5);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option label:hover {
    background: rgba(67, 97, 238, 0.1);
}

.radio-option input[type="radio"]:checked + label {
    background: rgba(67, 97, 238, 0.2);
    border: 1px solid #4361ee;
    color: #4cc9f0;
}

.radio-option label i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn {
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(to right, #4361ee, #3a0ca3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(67, 97, 238, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e6e6e6;
}

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

.result-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #b8c1ec;
}

.result-box {
    background: rgba(10, 10, 20, 0.7);
    padding: 15px;
    border-radius: 8px;
    min-height: 80px;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-box {
    background: rgba(20, 30, 70, 0.5);
    border-left: 4px solid #4cc9f0;
    padding: 15px;
    border-radius: 8px;
    margin-top: 25px;
}

.info-box h3 {
    color: #4cc9f0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cipher-type-selector {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cipher-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: rgba(10, 10, 20, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.cipher-tab.active {
    background: rgba(67, 97, 238, 0.3);
    color: #4cc9f0;
}

.cipher-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
}

.cipher-explanation {
    color: #a5b4cb;
    line-height: 1.6;
    margin-top: 10px;
}

.cipher-explanation ul {
    margin-left: 20px;
    margin-top: 5px;
}

.cipher-explanation li {
    margin-bottom: 5px;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a5b4cb;
    font-size: 0.9rem;
}

.footer a {
    color: #4cc9f0;
    text-decoration: none;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .key-inputs {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .cipher-type-selector {
        flex-direction: column;
    }
}
