/* Encryption Playground Styles */
.tool-container {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.encryption-content {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.algorithm-selector {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.algorithm-selector h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.algorithm-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.algorithm-tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.algorithm-tab:hover {
    background: var(--accent-color);
    color: white;
}

.algorithm-tab.active {
    background: var(--primary-color);
    color: white;
}

.algorithm-info {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
}

.algorithm-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.algorithm-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.input-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.input-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    background: var(--input-bg);
    color: var(--text-primary);
    resize: vertical;
}

.key-section {
    margin-bottom: 1.5rem;
}

.key-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.key-section input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--input-bg);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.generate-key-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.generate-key-btn:hover {
    background: var(--accent-hover);
}

.caesar-options {
    margin-bottom: 1.5rem;
}

.caesar-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.caesar-options input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.encrypt-button, .decrypt-button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.encrypt-button {
    background: var(--primary-color);
    color: white;
}

.encrypt-button:hover {
    background: var(--primary-hover);
}

.decrypt-button {
    background: var(--accent-color);
    color: white;
}

.decrypt-button:hover {
    background: var(--accent-hover);
}

.output-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.output-group {
    margin-bottom: 1rem;
}

.output-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.output-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--input-bg);
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
}

.copy-button {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-button:hover {
    background: var(--accent-hover);
}

.educational-panel {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.educational-panel h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.educational-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.edu-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.edu-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.edu-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.comparison-section {
    margin-bottom: 3rem;
}

.comparison-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.comparison-table {
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: var(--bg-secondary);
}

.security-tips h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tip-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.tip-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .algorithm-tabs {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Copy feedback animation */
@keyframes copyFlash {
    0% { background: var(--accent-color); }
    100% { background: var(--success-bg); }
}

.copied-feedback {
    animation: copyFlash 0.5s ease;
}