:root {
    --primary: #94c83e;
    --primary-hover: #7db32e;
    --primary-light: rgba(148, 200, 62, 0.1);
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #94c83e;
    --success-light: rgba(148, 200, 62, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-light: rgba(239, 68, 68, 0.1);
    
    --bg-primary: #101010;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: #333333;
    --border-light: #444444;
    
    --btn-gradient: linear-gradient(to right, #1a5ddf, #2580a7);
    --btn-gradient-hover: linear-gradient(to right, #1550c5, #1f6d8f);
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Main Content */
main {
    flex: 1;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-group label svg {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

textarea,
input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea::placeholder,
input::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    background-image: -webkit-gradient(linear, left top, right top, from(#1a5ddf), to(#2580a7));
    background-image: linear-gradient(to right, #1a5ddf, #2580a7);
    color: white;
}

.btn-primary:hover {
    background-image: -webkit-gradient(linear, left top, right top, from(#1550c5), to(#1f6d8f));
    background-image: linear-gradient(to right, #1550c5, #1f6d8f);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    width: 100%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-icon {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-icon:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Cards */
.success-card,
.view-card,
.revealed-card,
.error-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border);
}

.success-icon {
    color: var(--success);
    margin-bottom: 1rem;
}

.warning-icon {
    color: var(--warning);
    margin-bottom: 1rem;
}

.error-icon {
    color: var(--error);
    margin-bottom: 1rem;
}

.success-card h2,
.view-card h2,
.revealed-card h2,
.error-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.success-card p,
.view-card p,
.error-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.warning-text {
    background: var(--warning-light);
    color: var(--warning) !important;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

/* Link Box */
.link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.link-box input {
    flex: 1;
    background: var(--bg-primary);
    font-family: monospace;
    font-size: 0.875rem;
}

/* Expiry Info */
.expiry-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Password Section */
.password-section {
    margin-bottom: 1.5rem;
    text-align: left;
}

.password-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Revealed Secret */
.revealed-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.burned-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--error-light);
    color: var(--error);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.burned-text {
    color: var(--text-muted) !important;
    font-size: 0.875rem;
}

.secret-display {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.secret-display pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.secret-display .btn-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.credit {
    font-size: 0.75rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: #1a5ddf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}
