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

:root {
    --color-primary: #2563eb;
    --color-secondary: #1e40af;
    --color-bg-start: #2563eb;
    --color-bg-end: #1e40af;
    --color-accent: #eff6ff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header .logo {
    margin-bottom: 10px;
}

header .logo img {
    display: inline-block;
    filter: brightness(0) invert(1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
}

.auth-status {
    padding: 15px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-status a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-status a:hover {
    text-decoration: underline;
}

main {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    margin-left: 10px;
}

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

.result {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.result h3 {
    margin-bottom: 15px;
    color: #495057;
}

.link-display {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.link-display input {
    flex: 1;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.reveal-prompt {
    text-align: center;
    padding: 40px 20px;
}

.warning {
    font-size: 1.2rem;
    color: #dc3545;
    margin-bottom: 20px;
    font-weight: 600;
}

.reveal-prompt p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #495057;
}

.secret-display {
    margin-top: 30px;
}

.secret-display h3 {
    margin-bottom: 15px;
    color: #495057;
}

.secret-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    max-height: 400px;
    overflow-y: auto;
}

.error-display {
    padding: 25px;
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    text-align: center;
}

.hidden {
    display: none !important;
}

footer {
    background: #f8f9fa;
    padding: 30px;
    border-top: 1px solid #dee2e6;
}

.security-info {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--color-accent);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.security-info h3 {
    margin-bottom: 10px;
    color: #495057;
}

.security-info p,
.limits p {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
}

.limits {
    margin-bottom: 20px;
}

.contact {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 15px;
}

.contact a {
    color: #667eea;
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
}

.auth-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
}

.char-counter.warning {
    color: #dc3545;
}

.error-message {
    margin-top: 10px;
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 0.9rem;
}

.error-message.hidden {
    display: none;
}

.unauth-container {
    text-align: center;
    padding: 40px 20px;
}

.unauth-description {
    margin: 20px 0;
    font-size: 1.1rem;
    color: #495057;
}

.unauth-actions {
    margin-top: 30px;
}

.btn-spacing {
    margin-left: 15px;
}

.result-info {
    margin-top: 20px;
    color: #495057;
}

.result-actions {
    margin-top: 20px;
}

.inline-form {
    display: inline;
}

.btn-logout {
    padding: 8px 16px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 30px 20px;
    }

    .link-display {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .btn-danger {
        margin-left: 0;
        margin-top: 10px;
    }
}
