@font-face {
    font-family: 'DeathNote';
    src: url('DeathNote.ttf') format('truetype');
    font-display: swap;
}

body {
    background-color: #1a1a1a;
    background-image: url("dark-leather.png");
    background-size: cover;
    background-attachment: fixed;
    color: #fff;
    font-family: 'DeathNote', serif;
    margin: 0;
    min-height: 100vh;
    letter-spacing: 0.05em;
    cursor: url('cursor.png'), auto; /* Quill cursor */
}

body.shinigami-eye-active .victim-age {
    display: inline;
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-left: 10px;
    text-shadow: 0 0 5px #ff0000;
}

.container {
    max-width: 600px;
    margin: 40px auto;
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid #333;
    border-radius: 15px;
    box-shadow: 0 0 50px 15px #000;
    padding: 40px 30px;
    position: relative;
}

.death-title {
    font-family: 'DeathNote', serif;
    font-size: 3.5rem;
    text-align: center;
    color: #fff;
    letter-spacing: 0.15em;
    text-shadow: 0 0 10px #f00, 0 0 5px #fff, 0 0 25px #000;
    margin-bottom: 40px;
}

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

.input-group label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #ddd;
    letter-spacing: 0.06em;
}

.input-group .optional {
    color: #a00;
    font-size: 1rem;
}

.input-group input, .input-group textarea, #toggle-rules, .extra-features button {
    cursor: url('cursor.png'), auto;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: #111;
    border: 1.5px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 1.2rem;
    outline: none;
    transition: border 0.3s, box-shadow 0.3s;
}

.input-group input:focus, .input-group textarea:focus {
    border: 1.5px solid #c00;
    box-shadow: 0 0 10px #c00;
}

#write-btn {
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(90deg, #c00 0%, #111 100%);
    color: #fff;
    font-family: 'DeathNote', serif;
    font-size: 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 10px #c00, 0 0 4px #fff;
    letter-spacing: 0.1em;
    margin-top: 10px;
    transition: background 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

#death-time {
    font-family: 'DeathNote', serif;
}

#write-btn:hover {
    background: linear-gradient(90deg, #f00 0%, #000 100%);
    box-shadow: 0 0 20px #c00, 0 0 8px #fff;
}

.ink-drip {
    position: absolute;
    bottom: -50px;
    left: 50%;
    width: 4px;
    height: 50px;
    background: #c00;
    border-radius: 2px;
    transform: translateX(-50%);
    animation: drip 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes drip {
    0% { bottom: 100%; opacity: 1; }
    100% { bottom: -50px; opacity: 0; }
}

.death-log-section {
    margin-top: 40px;
}

.death-log-section h2 {
    font-family: 'DeathNote', serif;
    font-size: 1.8rem;
    color: #c00;
    margin-bottom: 15px;
    text-shadow: 0 0 8px #f00, 0 0 4px #fff;
}

.death-log {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(20, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px 0;
    box-shadow: 0 0 15px #000;
}

.death-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 5px 15px;
    padding: 12px 20px;
    border-bottom: 1px solid #333;
    font-size: 1.1rem;
    color: #ddd;
    transition: background 0.3s, transform 0.3s;
}

.death-entry:last-child {
    border-bottom: none;
}

.death-entry .name-age-container {
    grid-column: 1 / 2;
    display: flex;
    align-items: baseline;
}

.death-entry .name {
    font-family: 'DeathNote', serif;
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 0.08em;
    grid-column: 1 / 2;
}

.death-entry .cause {
    color: #e55;
    font-style: italic;
    grid-column: 1 / 2;
}

.death-entry .time {
    color: #bbb;
    grid-column: 2 / 3;
    text-align: right;
}

.death-entry .status {
    font-family: 'DeathNote', serif;
    font-size: 1.2rem;
    grid-column: 2 / 3;
    text-align: right;
}

.status-pending {
    color: #fff;
    text-shadow: 0 0 4px #fff, 0 0 10px #333;
}

.status-dead {
    font-weight: bold;
    color: #f00;
    text-shadow: 0 0 10px #f00, 0 0 4px #fff, 0 0 25px #c00;
    animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px #f00, 0 0 4px #fff, 0 0 25px #c00; }
    50% { opacity: 0.6; text-shadow: 0 0 15px #f00, 0 0 6px #fff, 0 0 35px #c00; }
}

.rules-section {
    margin-top: 40px;
    background: rgba(20, 0, 0, 0.7);
    border: 2px solid #333;
    border-radius: 10px;
    box-shadow: 0 0 15px #000;
    padding: 20px;
}

#toggle-rules {
    width: 100%;
    background: #222;
    color: #fff;
    font-family: 'DeathNote', serif;
    font-size: 1.2rem;
    border: 2px solid #c00;
    border-radius: 8px;
    padding: 12px 0;
    cursor: pointer;
    margin-bottom: 15px;
    letter-spacing: 0.08em;
    box-shadow: 0 0 10px #c00, 0 0 4px #fff;
    transition: background 0.3s, box-shadow 0.3s;
}

#toggle-rules:hover, #toggle-rules[aria-expanded="true"] {
    background: #c00;
    box-shadow: 0 0 20px #c00, 0 0 8px #fff;
}

.rules-content {
    background: rgba(0,0,0,0.8);
    border-radius: 8px;
    padding: 15px 20px;
    color: #ddd;
    font-size: 1.1rem;
    border: 1px solid #c00;
    box-shadow: 0 0 10px #c00;
    margin-top: 10px;
}

.rules-content ul {
    margin: 0;
    padding-left: 20px;
}

.rules-content li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #fff;
    text-shadow: 0 0 4px #fff, 0 0 10px #c00;
}

.extra-features {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.extra-features button {
    background: #222;
    color: #fff;
    font-family: 'DeathNote', serif;
    font-size: 1.1rem;
    border: 2px solid #c00;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
}

.extra-features button:hover {
    background: #c00;
    box-shadow: 0 0 15px #c00;
}

.ryuk-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.9);
    border: 2px solid #c00;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.2rem;
    font-style: italic;
    box-shadow: 0 0 20px #c00;
    z-index: 100;
}

::-webkit-scrollbar {
    width: 10px;
    background: #222;
}

::-webkit-scrollbar-thumb {
    background: #c00;
    border-radius: 5px;
}

@keyframes burn {
    0% {
        filter: blur(0) saturate(1) brightness(1);
        opacity: 1;
    }
    50% {
        filter: blur(10px) saturate(5) brightness(3);
        opacity: 0.8;
    }
    100% {
        filter: blur(20px) saturate(1) brightness(0);
        opacity: 0;
    }
}