/* ========================================
SECURE ENCRYPTION TOOL - WITH GOOGLE LOGIN
CSS Stylesheet
======================================== */

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background 0.3s ease;
}

/* Light Theme */
body.light-theme {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
}

/* Dark Theme */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

body.dark-theme .login-box {
    background: #2d2d3a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    transition: color 0.3s;
}

body.dark-theme .login-header h1 {
    color: #f0f0f0;
}

.login-header .subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
    transition: color 0.3s;
}

body.dark-theme .login-header .subtitle {
    color: #a0a0a0;
}

.security-features {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: left;
    border-left: 4px solid #2196f3;
    transition: all 0.3s;
}

body.dark-theme .security-features {
    background: #2a3a4a;
    border-left-color: #4da6ff;
    color: #e0e0e0;
}

.security-features h3 {
    margin-bottom: 15px;
    color: #1976d2;
    font-size: 18px;
    transition: color 0.3s;
}

body.dark-theme .security-features h3 {
    color: #66b3ff;
}

.security-features ul {
    padding-left: 20px;
    line-height: 1.8;
}

.security-features li {
    color: #555;
    margin-bottom: 8px;
    transition: color 0.3s;
}

body.dark-theme .security-features li {
    color: #c0c0c0;
}

.login-divider {
    position: relative;
    margin: 30px 0;
    text-align: center;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    transition: background 0.3s;
}

body.dark-theme .login-divider::before {
    background: #4a4a5a;
}

.login-divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

body.dark-theme .login-divider span {
    background: #2d2d3a;
    color: #a0a0a0;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
}

body.dark-theme .login-footer {
    border-top-color: #4a4a5a;
    color: #a0a0a0;
}

.login-footer .terms {
    margin-top: 8px;
    font-size: 12px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: #5568d3;
    text-decoration: underline;
}

body.dark-theme .login-footer a {
    color: #66b3ff;
}

body.dark-theme .login-footer a:hover {
    color: #4da6ff;
}

/* Google Sign-In Button Styling */
.g_id_signin {
    margin: 0 auto;
}

/* ===== MAIN APP STYLES ===== */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    transition: all 0.3s ease;
    display: none;
}

body.dark-theme .container {
    background: #2d2d3a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Header Section with Theme Toggle & User Profile */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    transition: border-color 0.3s;
}

body.dark-theme .header-section {
    border-bottom-color: #4a4a5a;
}

.theme-toggle {
    position: static;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}

body.dark-theme .user-info {
    background: #3a3a4a;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    font-weight: 600;
    color: #333;
    transition: color 0.3s;
}

body.dark-theme .username {
    color: #e0e0e0;
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-logout:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ===== HEADER STYLES ===== */
h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-size: 28px;
    transition: color 0.3s;
}

body.dark-theme h1 {
    color: #f0f0f0;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
    transition: color 0.3s;
}

body.dark-theme .subtitle {
    color: #a0a0a0;
}

/* ===== TABS STYLES ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    transition: border-color 0.3s;
}

body.dark-theme .tabs {
    border-bottom-color: #4a4a5a;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    background: #f5f5f5;
    border: none;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 15px;
}

body.dark-theme .tab {
    background: #3a3a4a;
    color: #e0e0e0;
}

.tab:hover {
    background: #e8e8e8;
}

body.dark-theme .tab:hover {
    background: #4a4a5a;
}

.tab.active {
    background: #667eea;
    color: white;
}

body.dark-theme .tab.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== INPUT STYLES ===== */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

body.dark-theme label {
    color: #e0e0e0;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 150px;
    transition: all 0.3s;
    background: white;
    color: #333;
}

body.dark-theme textarea {
    background: #2a2a35;
    color: #f0f0f0;
    border-color: #4a4a5a;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
    transition: all 0.3s;
    background: white;
    color: #333;
}

body.dark-theme input[type="password"] {
    background: #2a2a35;
    color: #f0f0f0;
    border-color: #4a4a5a;
}

input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

/* ===== BUTTON STYLES ===== */
.btn {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

body.dark-theme .btn-secondary {
    background: #5a6268;
}

body.dark-theme .btn-secondary:hover {
    background: #4a4f55;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

/* ===== RESULT STYLES ===== */
.result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

body.dark-theme .result {
    background: #2a2a35;
    border-left-color: #667eea;
}

.result h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
    transition: color 0.3s;
}

body.dark-theme .result h3 {
    color: #f0f0f0;
}

.encrypted-text {
    background: #1e1e1e;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.5;
    transition: all 0.3s;
}

body.dark-theme .encrypted-text {
    background: #1a1a25;
    color: #e0e0e0;
}

/* ===== STATUS STYLES ===== */
.status {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

body.dark-theme .status.success {
    background: #1a3a2a;
    color: #66ff99;
    border-color: #2a5a3a;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

body.dark-theme .status.error {
    background: #3a1a1a;
    color: #ff6666;
    border-color: #5a2a2a;
}

/* ===== FILE INPUT STYLES ===== */
.file-input {
    margin-bottom: 20px;
    text-align: center;
}

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

.file-label {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.file-label:hover {
    background: #5568d3;
}

.file-info {
    margin-top: 10px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    display: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s;
}

body.dark-theme .file-info {
    background: #2a3a4a;
    border-left-color: #4da6ff;
    color: #e0e0e0;
}

.file-info.encrypted {
    background: #fff3e0;
    border-left-color: #ff9800;
}

body.dark-theme .file-info.encrypted {
    background: #3a2a1a;
    border-left-color: #ffcc66;
}

.file-info.decrypted {
    background: #e8f5e8;
    border-left-color: #4caf50;
}

body.dark-theme .file-info.decrypted {
    background: #1a3a2a;
    border-left-color: #66ff99;
}

/* ===== PROGRESS BAR STYLES ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
    transition: all 0.3s;
}

body.dark-theme .progress-bar {
    background: #3a3a4a;
}

.progress {
    height: 100%;
    background: #667eea;
    width: 0%;
    transition: width 0.3s;
}

/* ===== COPY BUTTON STYLES ===== */
.copy-btn {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #218838;
}

/* ===== DOWNLOAD SECTION STYLES ===== */
.download-section {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 8px;
    display: none;
    transition: all 0.3s;
}

body.dark-theme .download-section {
    background: #1a3a2a;
}

/* ===== INSTRUCTIONS STYLES ===== */
.instructions {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid #2196f3;
    transition: all 0.3s;
}

body.dark-theme .instructions {
    background: #2a3a4a;
    border-left-color: #4da6ff;
    color: #e0e0e0;
}

.instructions h4 {
    margin-bottom: 8px;
    color: #1976d2;
    font-size: 16px;
    transition: color 0.3s;
}

body.dark-theme .instructions h4 {
    color: #66b3ff;
}

.instructions ul {
    padding-left: 20px;
    margin-top: 8px;
}

.instructions li {
    margin-bottom: 5px;
    color: #555;
    transition: color 0.3s;
}

body.dark-theme .instructions li {
    color: #c0c0c0;
}

/* ===== FILE PREVIEW STYLES ===== */
.file-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px dashed #667eea;
    transition: all 0.3s;
}

body.dark-theme .file-preview {
    background: #2a2a35;
    border-color: #667eea;
}

.file-preview h4 {
    margin-bottom: 15px;
    color: #333;
    transition: color 0.3s;
}

body.dark-theme .file-preview h4 {
    color: #f0f0f0;
}

.preview-container {
    max-height: 400px;
    overflow-y: auto;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 350px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-pdf {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.preview-text {
    background: #1e1e1e;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 350px;
    overflow-y: auto;
    line-height: 1.5;
}

body.dark-theme .preview-text {
    background: #1a1a25;
    color: #e0e0e0;
}

.preview-audio {
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
}

.preview-video {
    max-width: 100%;
    max-height: 350px;
    border-radius: 8px;
}

.preview-icon {
    font-size: 80px;
    color: #667eea;
    margin-bottom: 10px;
}

.preview-filename {
    font-weight: 600;
    margin-top: 10px;
    color: #555;
    transition: color 0.3s;
}

body.dark-theme .preview-filename {
    color: #e0e0e0;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }

    .login-box {
        padding: 30px 20px;
        margin: 10px;
    }

    h1 {
        font-size: 24px;
    }

    .tab {
        padding: 10px 15px;
        font-size: 13px;
    }

    .instructions {
        font-size: 13px;
    }

    .theme-toggle {
        position: static;
        text-align: center;
        margin-bottom: 15px;
    }

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

    .user-profile {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 25px 15px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        width: 100%;
        border-radius: 8px;
        margin-bottom: 5px;
    }

    .encrypted-text {
        font-size: 12px;
    }

    .preview-image,
    .preview-video {
        max-height: 250px;
    }

    .preview-pdf {
        height: 300px;
    }

    .security-features ul {
        font-size: 13px;
    }
}