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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #374151;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: #374151;
    position: relative;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.logo-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.logo-link:active {
    transform: translateY(0);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    filter: drop-shadow(0 4px 8px rgba(79,109,245,0.2));
    transition: all 0.3s ease;
}

.logo-icon svg {
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-icon svg {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(79,109,245,0.3));
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(79,109,245,0.2);
    background: linear-gradient(135deg, #4F6DF5 0%, #7C8EF8 50%, #5B73F6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    letter-spacing: -0.02em;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #6b7280;
}


/* Main Content */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Views */
.view {
    display: none;
    width: 100%;
}

.view.active {
    display: block;
}

/* Card */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(79,109,245,0.1);
    border: 1px solid rgba(226,232,240,0.8);
    position: relative;
}

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

.card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #374151;
    position: relative;
    letter-spacing: -0.01em;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4F6DF5, transparent);
    border-radius: 1px;
}

/* Forms */
.secret-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input, textarea, select {
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-family: inherit;
    position: relative;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #4F6DF5;
    box-shadow: 0 0 0 3px rgba(79, 109, 245, 0.1);
    background: rgba(255, 255, 255, 1);
}

input:hover, textarea:hover, select:hover {
    border-color: #9ca3af;
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

select option {
    background: #ffffff;
    color: #374151;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.char-count.warning {
    color: #f59e0b;
    font-weight: 500;
}

.char-count.danger {
    color: #ef4444;
    font-weight: 500;
    animation: pulse 1s infinite;
}

small {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

small strong {
    color: #374151;
    font-weight: 600;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    background: rgba(79,109,245,0.1);
    color: #4F6DF5;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(79,109,245,0.2);
    transition: all 0.2s;
}

.tooltip:hover {
    background: rgba(79,109,245,0.15);
    color: #4F6DF5;
    transform: scale(1.1);
    border-color: rgba(79,109,245,0.3);
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: normal;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #374151;
    z-index: 1000;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #4F6DF5 0%, #7C8EF8 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(79, 109, 245, 0.3);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    border: 1px solid rgba(79, 109, 245, 0.2);
    transition: all 0.2s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(79, 109, 245, 0.4);
    background: linear-gradient(135deg, #5B73F6 0%, #8B9EF9 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(79, 109, 245, 0.3);
}

.btn-large {
    font-size: 1rem;
    padding: 1.125rem 2rem;
    font-weight: 600;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-secondary:hover {
    background: rgba(79,109,245,0.05);
    border-color: #4F6DF5;
    color: #4F6DF5;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,109,245,0.15);
}

.btn-outline {
    background: transparent;
    color: #4F6DF5;
    border: 1px solid #4F6DF5;
}

.btn-outline:hover {
    background: #4F6DF5;
    color: white;
}

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

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loading {
    display: block;
}

/* Success View */
.success-icon {
    text-align: center;
    margin-bottom: 1rem;
    animation: celebration 0.8s ease-out;
}

.success-icon svg {
    filter: drop-shadow(0 4px 12px rgba(79,109,245,0.2));
}

@keyframes celebration {
    0% { transform: scale(0.2) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.link-container {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.link-container input {
    flex: 1;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    background: #f8fafc;
}

.info-box {
    background: rgba(79,109,245,0.05);
    border: 1px solid rgba(79,109,245,0.15);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.info-box h4 {
    color: #374151;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.info-box ul {
    list-style: none;
    color: #6b7280;
}

.info-box li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.4;
}

.info-box li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #4F6DF5;
    font-weight: bold;
    font-size: 1rem;
}

.info-box strong {
    color: #374151;
    font-weight: 600;
}

/* Secret Content */
.secret-content {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.secret-message {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Monaco', 'Menlo', monospace;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    color: #374151;
    font-size: 0.95rem;
}

.loading {
    color: #6b7280;
    font-weight: 500;
    animation: pulse 2s infinite;
    font-size: 0.95rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(220,38,38,0.1);
}

.password-prompt {
    margin-bottom: 1.5rem;
}

.password-prompt .form-group {
    flex-direction: row;
    gap: 0.5rem;
}

.password-prompt input {
    flex: 1;
}

.secret-info {
    margin-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

.actions {
    margin-top: 2rem;
    text-align: center;
}

.secret-actions {
    margin-top: 1rem;
    text-align: center;
}

/* Reveal Prompt */
.reveal-prompt {
    text-align: center;
    padding: 2rem;
}

.reveal-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.reveal-icon {
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(79,109,245,0.15));
}

.reveal-icon svg {
    transition: transform 0.3s ease;
}

.reveal-info:hover .reveal-icon svg {
    transform: scale(1.05);
}

.reveal-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    text-align: center;
}

.reveal-info p {
    color: #6b7280;
    margin: 0;
    max-width: 420px;
    line-height: 1.6;
    text-align: center;
    font-size: 0.95rem;
}

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

.security-info {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(226,232,240,0.8);
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.security-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79,109,245,0.2), transparent);
}

.security-info h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
    text-align: center;
}

.security-info ul {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.security-info li {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

.security-info li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #4F6DF5;
    font-weight: bold;
    font-size: 1rem;
    top: 0.2em;
}

.security-info li strong {
    color: #374151;
    font-weight: 600;
}

/* Copyright */
.copyright {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(226,232,240,0.8);
    opacity: 0.8;
    text-align: center;
}

.copyright p {
    color: #6b7280;
}

.copyright strong {
    color: #374151;
    font-weight: 600;
}

.copyright p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.copyright small {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

.toast {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.toast.error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .card {
        padding: 1.5rem;
        border-radius: 12px;
        margin: 0 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .link-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .password-prompt .form-group {
        flex-direction: column;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        max-width: none;
    }
    
    .security-info ul {
        text-align: center;
    }
    
    .tooltip:hover::after {
        max-width: 200px;
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 1rem;
        font-size: 1rem;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .header {
        margin-bottom: 2rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
    }
}