/* Deep Dark Minimal Theme - DeepDay */

:root {
    --bg-primary: #0D0F14;
    --accent-blue: #5A8CFF;
    --accent-gold: #F4C96F;
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: #C7CDD8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Manrope', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
}

/* Header Styles */
.app-header {
    padding-top: 20px;
}

.logo-text {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.date-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-blue);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    padding-bottom: 8px;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--accent-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-blue);
    border-radius: 2px;
}

/* Main Content */
.main-content {
    padding: 20px 0 40px;
}

.question-container {
    margin-bottom: 40px;
}

.question-text {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
}

.question-preview {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
}

.question-context {
    padding: 16px 0;
}

/* Answer Input */
.answer-section {
    margin-top: 30px;
    position: relative;
}

.answer-input {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary) !important;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    padding: 20px;
    resize: none;
    transition: all 0.3s ease;
    min-height: 150px;
}

/* Fix textarea color for dark background */
.form-control,
textarea.form-control {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
}

.form-control:focus,
textarea.form-control:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-blue) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 3px rgba(90, 140, 255, 0.1) !important;
}

.form-control::placeholder,
textarea.form-control::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.6 !important;
}

.answer-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.answer-input:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 140, 255, 0.1);
}

.answer-input.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Buttons */
.btn-submit {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #4A7CFF 100%);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(90, 140, 255, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(90, 140, 255, 0.4);
    background: linear-gradient(135deg, #6A9CFF 0%, #5A8CFF 100%);
}

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

/* Streak Indicator */
.streak-indicator {
    text-align: center;
    opacity: 0.6;
}

.streak-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.timeline-link-section {
    text-align: center;
}

.timeline-link-btn {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(90, 140, 255, 0.1);
    border: 1px solid rgba(90, 140, 255, 0.2);
}

.timeline-link-btn:hover {
    color: var(--text-primary);
    background: rgba(90, 140, 255, 0.15);
    border-color: rgba(90, 140, 255, 0.3);
    transform: translateX(4px);
}

/* Sorting Tabs */
.sorting-tabs {
    margin-bottom: 24px;
}

.btn-sort {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    padding: 10px 16px;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-sort:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-right: none;
}

.btn-sort:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-left: none;
}

.btn-sort.active {
    background-color: rgba(90, 140, 255, 0.15);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-sort:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Answer Cards */
.answers-feed {
    padding-bottom: 40px;
}

.answer-item-wrapper {
    margin-bottom: 20px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    padding: 20px;
    transition: all 0.3s ease;
}

.answer-item-wrapper:hover {
    border-color: rgba(90, 140, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.answer-card {
    margin-bottom: 0;
}


.answer-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.time-ago {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.reactions-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reactions-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.reaction-badge i {
    font-size: 16px;
}

.reaction-count-badge {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.total-reactions-count {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 4px;
    opacity: 0.7;
}

/* Reaction Dropdown */
.reaction-dropdown {
    position: relative;
}

.btn-reaction-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-reaction-toggle:hover {
    background: var(--card-border);
    color: var(--text-primary);
    transform: scale(1.05);
}

.btn-reaction-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(90, 140, 255, 0.25);
}

.reaction-menu {
    background: var(--bg-primary) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
}

.reaction-menu .dropdown-item {
    color: var(--text-primary) !important;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    background: transparent;
}

.reaction-menu .dropdown-item:last-child {
    margin-bottom: 0;
}

.reaction-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

.reaction-menu .dropdown-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.reaction-menu .dropdown-item span {
    font-size: 14px;
    font-weight: 500;
}

.reaction-icon {
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
    opacity: 0.8;
}

.reaction-icon:hover {
    transform: scale(1.2);
    opacity: 1;
}

.reaction-count {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* History List */
.history-list {
    padding-bottom: 40px;
}

.history-item {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(90, 140, 255, 0.3);
    transform: translateY(-2px);
}

.history-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 400;
}

.history-question {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.history-status {
    display: inline-block;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 400;
}

.history-status.answered {
    background-color: rgba(90, 140, 255, 0.15);
    color: var(--accent-blue);
}

.history-status.unlock {
    background-color: rgba(244, 201, 111, 0.15);
    color: var(--accent-gold);
}

/* History Modal */
.history-modal-content {
    background-color: var(--bg-primary);
    border: 1px solid var(--card-border);
    border-radius: 16px;
}

.history-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
}

.history-modal-header .modal-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
}

.history-modal-body {
    padding: 20px;
}

.history-modal-question {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.4;
}

.your-answer-section {
    padding: 16px;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.your-answer-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.your-answer-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

.btn-view-answers {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--accent-blue);
    border-radius: 12px;
    padding: 12px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.btn-view-answers:hover {
    background-color: rgba(90, 140, 255, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* Fade-in Animation */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        padding: 0 16px;
    }

    .question-text {
        font-size: 24px;
    }

    .answer-card {
        padding: 16px;
    }

    .history-item {
        padding: 16px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Static Pages */
.static-page-content {
    max-width: 800px;
    margin: 0 auto;
}

.static-page-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
}

.static-page-title {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

.static-page-date {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
    opacity: 0.7;
}

.static-page-section {
    margin-bottom: 32px;
}

.static-page-section h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.static-page-section h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    margin-top: 16px;
    margin-bottom: 8px;
}

.static-page-section p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.static-page-section ul,
.static-page-section ol {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-left: 24px;
    margin-bottom: 16px;
}

.static-page-section li {
    margin-bottom: 8px;
}

.static-page-section a.text-link {
    color: var(--accent-blue);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.static-page-section a.text-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--card-border);
    margin-top: 60px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Timeline Styles */
.timeline-container {
    padding: 20px 0 40px;
}

.timeline-wrapper {
    position: relative;
    padding-left: 30px;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        var(--accent-blue) 0%, 
        rgba(90, 140, 255, 0.3) 50%,
        rgba(90, 140, 255, 0.1) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -24px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent-blue);
    z-index: 2;
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    margin-left: 20px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(90, 140, 255, 0.3);
    transform: translateX(4px);
}

.timeline-date {
    font-size: 12px;
    color: var(--accent-blue);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.timeline-question {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.timeline-answer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}

.timeline-answer-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.timeline-answer-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.timeline-actions {
    margin-top: 12px;
}

.timeline-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timeline-link:hover {
    color: var(--text-primary);
    gap: 8px;
}

/* Login Message */
.login-message {
    padding: 40px 20px;
}

.login-message p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Lock Screen Overlay */
.lock-screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 15, 20, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    border-radius: 12px;
}

.lock-screen-container {
    position: relative;
    min-height: 200px;
}

.main-content {
    position: relative;
    min-height: 400px;
}

@media (max-width: 768px) {
    .static-page-container {
        padding: 20px;
    }
    
    .static-page-title {
        font-size: 24px;
    }
    
    .timeline-wrapper {
        padding-left: 24px;
    }
    
    .timeline-wrapper::before {
        left: 6px;
    }
    
    .timeline-marker {
        left: -18px;
        width: 12px;
        height: 12px;
    }
    
    .timeline-content {
        margin-left: 12px;
        padding: 16px;
    }
    
    .timeline-question {
        font-size: 16px;
    }
}
