:root {
    --primary-glow: #ffd700;
    --secondary-glow: #6a5acd;
    --bg-dark: #0a0b1e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('assets/bg.png') no-repeat center center/cover;
    filter: brightness(0.8);
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(106, 90, 205, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
}

nav {
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    animation: fadeIn 1.5s ease;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

nav a:hover {
    color: var(--text-primary);
    border-bottom: 1px solid var(--primary-glow);
}

header {
    width: 100%;
    padding: 2rem;
    text-align: center;
    animation: fadeInDown 1s ease-out;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 0.2rem;
}

main {
    width: 90%;
    max-width: 800px;
    padding: 2rem 0;
    z-index: 1;
}

.input-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    margin-bottom: 3rem;
    transition: transform 0.3s ease;
}

.input-section:focus-within {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
}

textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    min-height: 150px;
    resize: none;
    margin-bottom: 1.5rem;
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

button {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #000;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

button:active {
    transform: scale(0.98);
}

.history-section {
    width: 100%;
}

.history-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.secret-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.secret-content {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    white-space: pre-wrap;
}

.secret-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Password Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 30, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.modal-content input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    margin-bottom: 1.5rem;
    outline: none;
    text-align: center;
}

.modal-content button {
    width: 100%;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }

    .input-section {
        padding: 1.5rem;
    }
}

/* Toast Styles */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--glass-bg);
    color: var(--text-primary);
    text-align: center;
    border-radius: 12px;
    padding: 1.5rem 2.5rem;
    /* Increased padding */
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    /* Center vertical */
    transform: translate(-50%, -50%) scale(0.9);
    /* Center and start slightly smaller */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy pop in */
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    font-weight: 500;
    font-size: 1.1rem;
    /* Slightly larger text */
}

.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}