@font-face {
    font-family: 'fontekids';
    src: url('../../font/fonts/Montserrat-Regular.otf') format('truetype');
}

/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'fontekids', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Layout das cifras */
.cipher-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .cipher-sections {
        grid-template-columns: 1fr;
    }
}

/* Cards das cifras */
.cipher-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cipher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.cesar .card-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.vigenere .card-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.description {
    font-size: 0.95rem;
    opacity: 0.95;
}

.card-body {
    padding: 30px;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Botões */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

.btn-encode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-decode {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-clear {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    color: white;
}

/* Caixa de resultado */
.result-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    min-height: 60px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    word-wrap: break-word;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.result-box:not(:empty) {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.result-box.error {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* Caixa de informações */
.info-box {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.info-box h4 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.info-box p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.example {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid #d0d9ff;
    font-family: 'Courier New', monospace;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 0.95rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

footer strong {
    color: #ffd700;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cipher-card {
    animation: fadeIn 0.5s ease;
}

.cesar {
    animation-delay: 0.1s;
}

.vigenere {
    animation-delay: 0.2s;
}

/* Responsividade */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .btn {
        min-width: 100%;
    }
    
    .cipher-sections {
        grid-template-columns: 1fr;
    }
}
