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

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 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;
}

.logo {
    font-size: 3rem;
    font-weight: 300;
    color: #ff4444;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tagline {
    color: #888;
    font-size: 1rem;
    font-weight: 300;
}

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

/* Form styles */
.note-form {
    width: 100%;
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff4444;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.1);
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
}

.time-inputs {
    display: flex;
    gap: 0.5rem;
}

.time-inputs input {
    flex: 1;
}

.time-inputs select {
    flex: 2;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #888;
}

/* Buttons */
.create-btn,
.secondary-btn,
.danger-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.create-btn {
    background: #ff4444;
    color: white;
    width: 100%;
}

.create-btn:hover {
    background: #ff3333;
    transform: translateY(-1px);
}

.secondary-btn {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

.secondary-btn:hover {
    background: #444;
}

.danger-btn {
    background: #cc0000;
    color: white;
}

.danger-btn:hover {
    background: #aa0000;
}

.create-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

/* Note result */
.note-result {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.result-content h2 {
    color: #ff4444;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.warning {
    color: #ffaa00;
    margin-bottom: 2rem;
    font-weight: 500;
}

.url-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.url-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 0.75rem;
    color: #e0e0e0;
    font-family: monospace;
    font-size: 0.9rem;
}

.copy-btn {
    padding: 0.75rem 1rem;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #444;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Note viewer */
.note-viewer {
    width: 100%;
    max-width: 600px;
}

.loading {
    text-align: center;
    padding: 3rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #ff4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.passphrase-prompt h2 {
    color: #ff4444;
    margin-bottom: 1rem;
}

.note-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.note-info {
    color: #888;
    font-size: 0.9rem;
}

.note-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

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

.countdown {
    text-align: center;
    margin-bottom: 2rem;
}

.countdown-timer {
    font-size: 2rem;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 0.5rem;
}

/* Error pages */
.error-page,
.privacy-page {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.error-content,
.privacy-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
}

.error-content h2,
.privacy-content h2 {
    color: #ff4444;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-subtitle {
    color: #888;
    margin: 1rem 0 0.5rem;
}

.error-list {
    text-align: left;
    margin: 1rem 0 2rem;
    color: #ccc;
}

.error-list li {
    margin-bottom: 0.5rem;
}

.privacy-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #ccc;
}

.privacy-content h3 {
    color: #ff4444;
    margin: 2rem 0 1rem;
    font-size: 1.2rem;
}

.privacy-content ul {
    text-align: left;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

.privacy-actions {
    margin-top: 2rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    color: #ff4444;
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #ccc;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.9rem;
}

.privacy-link {
    color: #ff4444;
    text-decoration: none;
}

.privacy-link:hover {
    text-decoration: underline;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem 0 1rem;
    text-align: center;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.875rem;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #ff4444;
}

.attribution {
    font-size: 0.75rem;
    color: #555;
    margin-top: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .url-container {
        flex-direction: column;
    }
    
    .note-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .time-inputs {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }
    
    .note-form {
        padding: 0;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.5rem;
    }
}