/* EPHEM - Stylesheet v2 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #0f0a1f;
    --color-bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1033 50%, #0f172a 100%);
    --color-card: rgba(30, 41, 59, 0.5);
    --color-card-border: rgba(71, 85, 105, 0.5);
    --color-primary: #a855f7;
    --color-primary-hover: #9333ea;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-text-hint: #64748b;
    --color-input-bg: rgba(15, 23, 42, 0.5);
    --color-input-border: #475569;
    --color-success: #22c55e;
    --color-success-bg: rgba(34, 197, 94, 0.2);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-warning-border: rgba(245, 158, 11, 0.3);
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.1);
    --color-danger-border: rgba(239, 68, 68, 0.3);
    --color-info: #8b5cf6;
    --color-info-bg: rgba(139, 92, 246, 0.1);
    --color-info-border: rgba(139, 92, 246, 0.3);
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--color-bg);
    background-image: var(--color-bg-gradient);
    background-attachment: fixed;
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    width: 100%;
}

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

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.025em;
}

.logo-link {
    text-decoration: none;
}

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

.tagline {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Card */
.card {
    background: var(--color-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-card-border);
    width: 100%;
    max-width: 28rem;
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

.label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.textarea {
    width: 100%;
    min-height: 9rem;
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.textarea::placeholder {
    color: var(--color-text-hint);
}

.textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.input {
    width: 100%;
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
    color: var(--color-text-hint);
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.input.error {
    border-color: var(--color-danger);
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.hint {
    color: var(--color-text-hint);
    font-size: 0.75rem;
}

.counter {
    color: var(--color-text-hint);
    font-size: 0.75rem;
}

.counter.warning {
    color: var(--color-warning);
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Password Section */
.password-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-label-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.toggle-icon-wrapper {
    font-size: 1rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.625rem;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #374151;
    transition: 0.3s;
    border-radius: 9999px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 1.25rem;
    width: 1.25rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(1.375rem);
}

/* Password Input Wrapper */
.password-input-wrapper {
    margin-top: 1rem;
    display: none;
}

.password-input-wrapper.visible {
    display: block;
}

.password-hint {
    color: var(--color-text-hint);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.password-hint.error {
    color: var(--color-danger);
}

/* Password entry on view page */
.password-entry {
    margin-bottom: 1rem;
}

.password-entry .label {
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-icon-wrapper {
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-primary:disabled {
    background: #475569;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-secondary {
    background: #374151;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-copy {
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 1rem;
    width: auto;
    flex-shrink: 0;
    min-width: 100px;
}

.btn-copy:hover {
    background: var(--color-primary-hover);
}

.btn-link {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

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

/* URL Box */
.url-box {
    display: flex;
    gap: 0.5rem;
    background: var(--color-input-bg);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 0.875rem;
    padding: 0.5rem;
    min-width: 0;
}

.url-input:focus {
    outline: none;
}

/* Alerts */
.alert {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.alert-icon-emoji {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-text {
    font-size: 0.75rem;
    opacity: 0.8;
}

.alert-warning {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
}

.alert-warning .alert-title {
    color: var(--color-warning);
}

.alert-warning .alert-text {
    color: rgba(245, 158, 11, 0.9);
}

.alert-danger {
    background: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
}

.alert-danger .alert-title {
    color: var(--color-danger);
}

.alert-danger .alert-text {
    color: rgba(239, 68, 68, 0.9);
}

.alert-info {
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
}

.alert-info .alert-title {
    color: var(--color-info);
}

.alert-info .alert-text {
    color: rgba(139, 92, 246, 0.9);
}

/* Success/Error/Confirm Headers */
.success-header,
.error-header,
.confirm-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: var(--color-success-bg);
    color: var(--color-success);
    font-size: 2rem;
}

.error-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: var(--color-danger-bg);
    color: var(--color-danger);
    font-size: 2rem;
}

.viewed-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(148, 163, 184, 0.2);
    color: var(--color-text-muted);
    font-size: 2rem;
}

.confirm-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(168, 85, 247, 0.2);
    color: var(--color-primary);
    font-size: 2rem;
}

.success-title,
.error-title,
.confirm-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.success-text,
.error-text,
.confirm-text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Revealed View */
.revealed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.revealed-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.title-icon-emoji {
    font-size: 1.25rem;
}

.deleted-badge {
    font-size: 0.75rem;
    color: var(--color-danger);
    background: var(--color-danger-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.message-box {
    background: var(--color-input-bg);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.message-box p {
    color: var(--color-text-muted);
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.7;
}

.info-box {
    background: rgba(71, 85, 105, 0.3);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin: 1rem 0;
}

.info-box p {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-align: center;
}

/* Footer */
.footer {
    margin-top: 2rem;
    text-align: center;
}

.footer p {
    color: var(--color-text-hint);
    font-size: 0.75rem;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Spinner */
.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */

/* Tablet */
@media (max-width: 768px) {
    .container {
        padding: 1.25rem;
    }
    
    .card {
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .textarea {
        min-height: 7rem;
    }
    
    .url-box {
        flex-direction: column;
    }
    
    .btn-copy {
        width: 100%;
    }
    
    .revealed-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alert {
        padding: 0.875rem;
    }
    
    .password-section {
        padding: 0.875rem;
    }
}
