:root {
    /* Dark Mode (Default) */
    --bg-main: #0B0F19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;

    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --accent: #10B981;
    --accent-glow: rgba(16, 185, 129, 0.4);
    --primary-glow: rgba(99, 102, 241, 0.4);
    --error: #EF4444;

    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --card-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-main: #F3F4F6;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-main: #111827;
    --text-muted: #4B5563;
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

/* Background Animated Orbs */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.1);
    }
}

/* Layout */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.view-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.5s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}

.glass-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Form Elements */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

[data-theme="light"] textarea {
    background: rgba(255, 255, 255, 0.5);
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.monospace {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #818CF8);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

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

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-text:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1rem;
}

/* Result Card */
.result-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.result-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.link-box {
    display: flex;
    gap: 0.5rem;
}

.link-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

[data-theme="light"] .link-box input {
    background: rgba(255, 255, 255, 0.8);
}

/* History */
.history-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.history-item-details {
    display: flex;
    flex-direction: column;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-title {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Decrypt View */
.decrypt-card {
    text-align: center;
}

.lock-icon-container {
    display: inline-flex;
    padding: 2rem;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    margin-bottom: 1.5rem;
    position: relative;
}

.lock-icon-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.revealed-container {
    margin-top: 2rem;
    text-align: left;
    animation: fadeIn 0.5s ease;
}

.revealed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.destruct-warning {
    font-size: 0.8rem;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Utilities */
@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
    }

    .glass-card {
        padding: 1.5rem;
    }
}