/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.logo {
    font-size: 2.5em;
    font-weight: 300;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: 1px;
}

.subtitle {
    color: #666666;
    margin-bottom: 50px;
    font-size: 0.9em;
    font-weight: 300;
}

.footer {
    position: fixed;
    bottom: 20px;
    color: #333333;
    font-size: 0.8em;
    font-weight: 300;
}

/* ==========================================================================
   FORM ELEMENTS (SHARED)
   ========================================================================== */

.form-container {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 24px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaaaaa;
    font-size: 0.9em;
    font-weight: 400;
}

.input-field {
    width: 100%;
    height: 52px;
    background: #111111;
    border: 1px solid #222222;
    border-radius: 6px;
    padding: 0 16px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #333333;
    background: #0a0a0a;
}

.input-field::placeholder {
    color: #555555;
}

.submit-btn {
    width: 100%;
    height: 52px;
    background: transparent;
    border: 1px solid #333333;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 6px;
    margin-top: 30px;
}

.submit-btn:hover {
    background: #111111;
    border-color: #444444;
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-btn:active {
    transform: scale(0.98);
}

.loading {
    display: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #333333;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   MESSAGES (SHARED)
   ========================================================================== */

.message {
    margin-top: 20px;
    padding: 14px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 300;
    display: none;
    text-align: center;
}

.message.error {
    display: block;
    background: #0f0000;
    border: 1px solid #330000;
    color: #ff6666;
}

.message.success {
    display: block;
    background: #001a00;
    border: 1px solid #003300;
    color: #66ff66;
}

.message.info {
    display: block;
    background: #0a0a0a;
    border: 1px solid #222233;
    color: #8888ff;
}

.error-message {
    background: #0f0000;
    border: 1px solid #330000;
    border-radius: 6px;
    padding: 12px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #ff6666;
    font-weight: 300;
    display: none;
}

.error-message.show {
    display: block;
}

/* ==========================================================================
   404 PAGE
   ========================================================================== */

.error-emoji {
    font-size: 120px;
    line-height: 1;
    margin-bottom: 30px;
    user-select: none;
}

.error-code {
    font-size: 2em;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.error-message {
    font-size: 1.1em;
    color: #888888;
    margin-bottom: 12px;
    font-weight: 300;
}

.error-hint {
    font-size: 0.9em;
    color: #555555;
    margin-bottom: 40px;
    font-weight: 300;
}

.back-link {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    border: 1px solid #333333;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: #111111;
    border-color: #444444;
}

.back-link:active {
    transform: scale(0.98);
}

/* ==========================================================================
   DASHBOARD PAGE
   ========================================================================== */

.user-info {
    text-align: right;
    margin-bottom: 40px;
    color: #666666;
    font-size: 0.85em;
}

.user-info strong {
    color: #888888;
}

.user-info a {
    color: #1261a0;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.2s ease;
}

.user-info a:hover {
    color: #1573c4;
}

.mode-selector {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    justify-content: center;
}

.mode-option {
    background: transparent;
    border: none;
    color: #666666;
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 0.9em;
    font-weight: 300;
    padding: 8px 0;
}

.mode-option.active {
    color: #aaaaaa;
}

.mode-option:hover {
    color: #aaaaaa;
}

.content-area {
    margin-bottom: 30px;
}

.text-container {
    display: block;
}

.file-container {
    display: none;
}

.text-area {
    width: 100%;
    min-height: 220px;
    max-height: 220px;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 16px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: none;
    transition: all 0.2s ease;
}

.text-area:focus {
    outline: none;
    border-color: #555555;
    background: #111111;
}

.text-area::placeholder {
    color: #555555;
    font-family: 'Inter', sans-serif;
}

.upload-area {
    border: 2px dashed #333333;
    border-radius: 8px;
    padding: 70px 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #0a0a0a;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    border-color: #555555;
    background: #111111;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
    color: #444444;
    font-weight: 300;
}

.upload-text {
    font-size: 1em;
    color: #888888;
    margin-bottom: 8px;
}

.upload-subtext {
    font-size: 0.85em;
    color: #555555;
    font-weight: 300;
}

.file-input {
    display: none;
}

.password-input {
    width: 100%;
    height: 52px;
    background: #111111;
    border: 1px solid #222222;
    border-radius: 6px;
    padding: 0 16px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.2s ease;
}

.password-input:focus {
    outline: none;
    border-color: #333333;
    background: #0a0a0a;
}

.password-input::placeholder {
    color: #555555;
}

.password-hint {
    font-size: 0.8em;
    color: #666666;
    margin-top: 6px;
    font-weight: 300;
}

.timing-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.timing-option {
    flex: 1;
    min-width: 100px;
    height: 44px;
    background: #111111;
    border: 1px solid #222222;
    border-radius: 6px;
    color: #aaaaaa;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timing-option:hover {
    border-color: #333333;
    background: #0a0a0a;
}

.timing-option.active {
    border-color: #555555;
    background: #1a1a1a;
    color: #ffffff;
}

.result-container {
    display: none;
}

.result-container.show {
    display: block;
}

.result-title {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 1.1em;
    font-weight: 400;
}

.result-item {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #111111;
    border: 1px solid #222222;
    border-radius: 6px;
    padding: 16px;
}

.result-value {
    font-family: 'Courier New', monospace;
    color: #ffffff;
    word-break: break-all;
    flex-grow: 1;
    font-size: 0.9em;
    line-height: 1.4;
}

.copy-btn {
    background: transparent;
    border: 1px solid #333333;
    color: #aaaaaa;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
    border-radius: 4px;
    font-weight: 400;
}

.copy-btn:hover {
    color: #ffffff;
    border-color: #444444;
    background: #0a0a0a;
}

.back-btn {
    width: 100%;
    height: 42px;
    background: transparent;
    border: 1px solid #222222;
    color: #666666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
    border-radius: 6px;
    font-weight: 400;
}

.back-btn:hover {
    color: #aaaaaa;
    border-color: #333333;
}

/* ==========================================================================
   DOWNLOAD PAGE
   ========================================================================== */

.lock-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: #444444;
}

.content-display {
    display: none;
}

.content-display.show {
    display: block;
}

.content-title {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 1.2em;
    font-weight: 400;
}

.text-content {
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 20px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 20px;
}

.copy-text-btn {
    width: 100%;
    height: 42px;
    background: transparent;
    border: 1px solid #222222;
    color: #aaaaaa;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    font-weight: 400;
}

.copy-text-btn:hover {
    color: #ffffff;
    border-color: #333333;
    background: #0a0a0a;
}

.file-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: #444444;
}

.file-name {
    font-family: 'Courier New', monospace;
    color: #ffffff;
    margin-bottom: 30px;
    word-break: break-all;
    font-size: 0.95em;
}

.download-btn {
    display: inline-block;
    width: 100%;
    height: 52px;
    background: transparent;
    border: 1px solid #333333;
    color: #ffffff;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    font-weight: 400;
    line-height: 52px;
}

.download-btn:hover {
    background: #111111;
    border-color: #444444;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }

    .logo {
        font-size: 2em;
    }

    .subtitle {
        font-size: 0.85em;
        margin-bottom: 40px;
    }

    .input-field {
        height: 48px;
        font-size: 14px;
    }

    .submit-btn {
        height: 48px;
        font-size: 15px;
    }

    .error-emoji {
        font-size: 90px;
    }

    .error-code {
        font-size: 1.6em;
    }

    .error-message {
        font-size: 1em;
    }

    .text-area {
        min-height: 150px;
        max-height: 150px;
        font-size: 13px;
    }

    .upload-area {
        padding: 40px 15px;
        height: 150px;
    }

    .upload-icon {
        font-size: 2em;
    }

    .password-input {
        height: 48px;
    }

    .timing-option {
        height: 40px;
        font-size: 0.85em;
    }
}

@media (min-width: 769px) {
    .container {
        max-width: 500px;
    }

    .logo {
        font-size: 3em;
        margin-bottom: 12px;
    }

    .subtitle {
        font-size: 1em;
        margin-bottom: 60px;
    }

    .input-field {
        height: 56px;
        font-size: 16px;
    }

    .submit-btn {
        height: 56px;
        font-size: 17px;
    }
}

/* Dashboard specific desktop adjustments */
@media (min-width: 769px) {
    .dashboard-page .container {
        max-width: 700px;
    }
}

/* Download specific desktop adjustments */
@media (min-width: 769px) {
    .download-page .container {
        max-width: 500px;
    }
}
