/* Encoding Tools Styles */

.encoding-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.encoding-header {
    text-align: center;
    margin-bottom: 2rem;
}

.encoding-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.encoding-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.tab {
    padding: 0.75rem 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab:hover {
    border-color: var(--primary);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
}

/* Panels */
.panel {
    display: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.panel.active {
    display: block;
}

/* Input Section */
.input-section {
    margin-bottom: 1.5rem;
}

.input-section label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.input-section textarea,
.input-section input[type="text"],
.input-section input[type="password"] {
    width: 100%;
    padding: 0.875rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    box-sizing: border-box;
}

.input-section textarea:focus,
.input-section input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Hash Results */
.hash-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hash-result label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.hash-value-row {
    display: flex;
    gap: 0.5rem;
}

.hash-value-row input {
    flex: 1;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--primary);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    min-width: 0;
}

.copy-btn {
    padding: 0.75rem 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Dual Panel Layout */
.dual-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.panel-section {
    display: flex;
    flex-direction: column;
}

.panel-section label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.panel-section textarea {
    flex: 1;
    min-height: 150px;
    padding: 0.875rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}

.panel-section textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.action-btn {
    margin-top: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.action-btn.encrypt {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.action-btn.encrypt:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.action-btn.decrypt {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.action-btn.decrypt:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Options Row */
.options-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Key Input */
.key-input-row {
    display: flex;
    gap: 0.5rem;
}

.key-input-row input {
    flex: 1;
    padding: 0.875rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    min-width: 0;
}

.key-input-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.toggle-btn {
    padding: 0.875rem 1.25rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.toggle-btn:hover {
    border-color: var(--primary);
}

/* Encrypt Warning */
.encrypt-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    color: #10b981;
    font-size: 0.9rem;
}

.encrypt-warning svg {
    flex-shrink: 0;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: calc(100% - 2rem);
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: var(--error);
    color: var(--error);
}

/* Responsive */
@media (max-width: 768px) {
    .encoding-container {
        padding: 1rem;
    }

    .encoding-header h1 {
        font-size: 2rem;
    }

    .tabs {
        gap: 0.375rem;
    }

    .tab {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
        flex: 1 1 auto;
        text-align: center;
    }

    .panel {
        padding: 1rem;
    }

    .dual-panel {
        grid-template-columns: 1fr;
    }

    .panel-section textarea {
        min-height: 120px;
    }

    .hash-value-row {
        flex-direction: column;
    }

    .hash-value-row input {
        font-size: 0.75rem;
    }

    .key-input-row {
        flex-direction: column;
    }

    .encrypt-warning {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .encoding-header h1 {
        font-size: 1.75rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        width: 100%;
    }
}
