/* ==========================================
   VanishNote — Premium Stylesheet
   ========================================== */

:root {
    --bg-color: #07090e;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
    --danger-glow: rgba(239, 68, 68, 0.25);
    
    --card-bg: rgba(15, 23, 42, 0.65);
    --card-border: rgba(255, 255, 255, 0.06);
    --input-bg: rgba(30, 41, 59, 0.45);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-focus: #818cf8;
    
    --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Space Grotesk', system-ui, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-ui);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 1rem;
}

/* Background Glowing Orbs */
.bg-gradient-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    animation: pulseOrbs 12s ease-in-out infinite alternate;
}

.orb-1 {
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.orb-2 {
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -6s;
}

@keyframes pulseOrbs {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(40px, 30px); }
}

/* App Container Layout */
.app-container {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Header styling */
.app-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #818cf8;
    margin-bottom: 0.5rem;
}

.logo svg {
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Glassmorphism Card styling */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* Sections */
.app-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.d-none {
    display: none !important;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: -0.5rem;
}

.text-center {
    text-align: center;
}

/* Quill Editor Styling Customization */
.editor-wrapper {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.editor-wrapper:focus-within {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Override Quill Toolbar styling */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid var(--input-border) !important;
    background: rgba(15, 23, 42, 0.4);
    padding: 8px 12px !important;
}

.ql-snow .ql-stroke {
    stroke: var(--text-color) !important;
}

.ql-snow .ql-fill {
    fill: var(--text-color) !important;
}

.ql-snow .ql-picker {
    color: var(--text-color) !important;
}

.ql-snow .ql-picker-options {
    background-color: #1e293b !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-label:hover {
    color: #818cf8 !important;
}

.ql-snow.ql-toolbar button:hover,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected {
    color: #818cf8 !important;
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke {
    stroke: #818cf8 !important;
}

/* Override Quill Container styling */
.ql-container.ql-snow {
    border: none !important;
    font-family: var(--font-ui) !important;
    font-size: 0.95rem !important;
}

.ql-editor {
    min-height: 180px;
    color: var(--text-color);
    padding: 12px 16px !important;
    line-height: 1.6 !important;
}

.ql-editor.ql-blank::before {
    color: #64748b !important;
    font-style: normal !important;
    left: 16px !important;
}

/* Custom Dropdown / Options styling */
.compose-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.option-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-color);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-danger {
    background: var(--danger-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--danger-glow);
    filter: brightness(1.1);
}

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

.w-100 {
    width: 100%;
}

/* Success Animation Elements */
.success-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--success);
}

.success-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--success-glow);
    border-radius: 50%;
    animation: ripple 2s infinite ease-out;
}

.success-checkmark {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: drawCheck 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

@keyframes ripple {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

/* Success Link Output */
.link-output-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 0.4rem;
    border-radius: 14px;
}

.link-output-group input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 0;
}

.link-output-group input:focus {
    outline: none;
}

.btn-copy {
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
}

/* Alerts */
.info-alert {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #a5b4fc;
    font-size: 0.85rem;
    line-height: 1.4;
}

.info-alert svg {
    flex-shrink: 0;
}

/* Destruction Warning Banner */
.destruction-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #fcd34d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.destruction-warning svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Note Viewer Styling */
.note-viewer-wrapper {
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    max-height: 400px;
    overflow-y: auto;
    width: 100%;
}

.note-viewer-wrapper .ql-editor {
    min-height: 100px;
}

/* Paste / pasted image display restrictions inside editor & viewer */
.ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Destroyed Screen Styling */
.destroyed-icon-wrapper {
    color: var(--danger-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.destroyed-icon-wrapper svg {
    filter: drop-shadow(0 0 12px var(--danger-glow));
    color: #f43f5e;
}

/* Footer info */
.app-footer-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .glass-card {
        padding: 1.75rem;
    }
    
    .link-output-group {
        flex-direction: column;
        padding: 0.5rem;
    }
    
    .btn-copy {
        width: 100%;
    }
}
