/* Text Encryption Light Theme Styles */

/* Tool Interface */

/* Dark mode overrides */
[data-theme="dark"] {
    --tool-bg: #0f172a;
    --tool-border: #334155;
    --tool-border-hover: #475569;
    --tool-text: #f8fafc;
    --tool-text-secondary: #94a3b8;
    --tool-input-bg: #1e293b;
    --tool-input-border: #334155;
    --tool-button-bg: #1e293b;
    --tool-button-hover: #334155;
    --tool-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --tool-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --background-color: #0f172a;
    --text-color: #f8fafc;
    --status-info: rgba(96, 165, 250, 0.2);
    --status-success: rgba(34, 197, 94, 0.2);
    --status-error: rgba(248, 113, 113, 0.2);
    --bg-color: #0f172a;
}

/* Dark mode element overrides */
[data-theme="dark"] .tool-card {
    background: var(--bg-card, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .tool-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--input-bg, #1e293b);
    color: var(--text-primary, #f8fafc);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .tab-btn.active {
    color: white;
}

[data-theme="dark"] label {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] p {
    color: var(--text-secondary, #cbd5e1);
}

/* Dark mode border and element overrides */
[data-theme="dark"] .section-header {
    border-color: #334155;
}

[data-theme="dark"] .process-section {
    border-color: #334155;
}

[data-theme="dark"] .status-message.success {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

[data-theme="dark"] .status-message.error {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

[data-theme="dark"] .detail-item {
    border-color: #334155;
}

[data-theme="dark"] .warning-item {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
}

[data-theme="dark"] .key-info {
    border-color: #334155;
}

[data-theme="dark"] .info-section {
    border-color: #334155;
}

.tool-interface {
    background: var(--bg-secondary);
    min-height: 60vh;
    padding: 2rem 0;
}

.tool-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Mode Panel */
.mode-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mode-panel h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.mode-toggles {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    min-width: 120px;
}

.mode-toggle:hover {
    border-color: #4a90e2;
    background: var(--color-blue-soft);
    transform: translateY(-2px);
}

.mode-toggle.active {
    border-color: #4a90e2;
    background: var(--color-blue-soft);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

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

.mode-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.mode-text {
    font-weight: 600;
    color: var(--text-primary);
}

/* Settings Panel */
.settings-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.settings-panel h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

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

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.setting-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--bg-primary);
    transition: border-color 0.3s ease;
}

.setting-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Key Panel */
.key-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.key-panel h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.key-input-group {
    margin-bottom: 1rem;
}

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

.key-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.key-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.key-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.key-strength {
    margin-bottom: 1rem;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
}

.strength-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.strength-level {
    font-weight: 600;
}

.strength-message {
    color: var(--text-secondary);
}

.key-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Text Panel */
.text-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.text-section {
    position: relative;
}

.section-header {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.text-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.text-section textarea {
    width: 100%;
    padding: 1.5rem;
    border: none;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.text-section textarea:focus {
    outline: none;
    background: var(--bg-secondary);
}

.process-section {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.process-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.process-status {
    min-height: 30px;
}

.status-message {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
}

.status-message.success {
    background: var(--color-green-soft);
    color: var(--text-success);
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: var(--color-red-soft);
    color: var(--text-danger);
    border: 1px solid #f5c6cb;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    var(--bg-primary)-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #357abd 0%, #2c5d8f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.btn-outline {
    background: var(--bg-primary);
    color: #4a90e2;
    border: 2px solid #4a90e2;
}

.btn-outline:hover:not(:disabled) {
    background: #4a90e2;
    color: var(--bg-primary);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

/* Info Panel */
.info-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-panel h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.encryption-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.detail-item label {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-item span {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Security Panel */
.security-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.security-panel h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.security-warnings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.warning-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary)3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.warning-icon {
    font-size: 1.5rem;
    color: var(--warning-color);
}

.warning-content {
    flex: 1;
}

.warning-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--warning-color);
    font-weight: 600;
}

.warning-content p {
    margin: 0;
    color: var(--warning-color);
    line-height: 1.5;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #28a745;
    color: var(--bg-primary);
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.toast-error {
    background: #dc3545;
}

.toast.toast-warning {
    background: #ffc107;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-container {
        gap: 1.5rem;
    }

    .mode-panel,
    .settings-panel,
    .key-panel,
    .text-panel,
    .info-panel,
    .security-panel {
        padding: 1.5rem;
    }

    .mode-toggles {
        flex-direction: column;
        align-items: center;
    }

    .mode-toggle {
        min-width: 150px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

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

    .key-actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .text-actions {
        justify-content: flex-start;
    }

    .process-controls {
        flex-direction: column;
    }

    .encryption-details {
        grid-template-columns: 1fr;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

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

    .toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .text-section textarea {
        font-size: 0.8rem;
        padding: 1rem;
    }

    .strength-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Universal Elements Styles */

/* Tool Info */
.tool-info {
    background: var(--bg-primary);
    padding: 4rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.info-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border-left: 4px solid #007bff;
}

.info-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

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

/* How to Use */
.how-to-use {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.how-to-use h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 3rem;
    font-size: 2rem;
    font-weight: 600;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.step {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    position: relative;
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: -1rem auto 1.5rem;
}

.step-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

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

/* Cross Promotion */
.cross-promotion {
    background: var(--bg-primary);
    padding: 4rem 0;
}

.cross-promotion h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 3rem;
    font-size: 2rem;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tool-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    text-decoration: none;
    color: inherit;
}

.tool-card .tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card .tool-name {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.tool-card .tool-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design for Universal Elements */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .info-card, .step, .tool-card {
        padding: 1.5rem;
    }
}


