/* リセットとベース設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    background-image: 
        radial-gradient(at 20% 30%, rgba(139, 0, 0, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(75, 0, 0, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(139, 0, 0, 0.1) 0px, transparent 50%);
    min-height: 100vh;
    color: #e0e0e0;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '💀';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 600px;
    opacity: 0.02;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ヘッダー */
.header {
    text-align: center;
    color: #fff;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #8B0000;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 
        0 0 10px rgba(139, 0, 0, 0.8),
        0 0 20px rgba(139, 0, 0, 0.6),
        0 0 30px rgba(139, 0, 0, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
}

.header h1::before {
    content: '☠️ ';
    font-size: 3.5rem;
    vertical-align: middle;
    animation: skullShake 3s infinite;
}

.header h1::after {
    content: ' ☠️';
    font-size: 3.5rem;
    vertical-align: middle;
    animation: skullShake 3s infinite 0.5s;
}

@keyframes skullShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.subtitle {
    font-size: 1.2rem;
    color: #8B0000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.8);
    animation: pulse 2s infinite;
}

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

/* メインコンテンツ */
.main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* フォームカード */
.form-card, .countdown-card {
    background: rgba(10, 0, 0, 0.95);
    border: 2px solid rgba(139, 0, 0, 0.5);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 0 30px rgba(139, 0, 0, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 50px rgba(139, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
    position: relative;
}

.countdown-card {
    max-width: 900px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-card h2 {
    color: #8B0000;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-card h2::before {
    content: '☠️ ';
}

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.form-group input::placeholder {
    color: #666;
    font-size: 0.9rem;
}

.form-group input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.form-group small {
    margin-left: 10px;
    color: #666;
}

.date-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.date-input-wrapper input {
    flex: 1;
}

.calendar-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffd700;
    transform: scale(1.05);
}

.calendar-input {
    margin-top: 10px;
    width: 100%;
}

/* ボタン */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #8B0000 0%, #4B0000 100%);
    color: #fff;
    font-weight: 700;
    border: 2px solid #8B0000;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '☠️';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.3;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.8),
        0 10px 30px rgba(139, 0, 0, 0.6);
    background: linear-gradient(135deg, #A00000 0%, #600000 100%);
}

.btn-secondary {
    background: rgba(139, 0, 0, 0.2);
    border: 2px solid rgba(139, 0, 0, 0.5);
    color: #8B0000;
    text-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
}

.btn-secondary:hover {
    background: rgba(139, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.6);
}

/* カウントダウンセクション */
.countdown-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* 情報とメーターのラッパー */
.info-meter-wrapper {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(139, 0, 0, 0.1);
    border: 2px solid rgba(139, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.user-info {
    flex: 1;
}

.user-info p {
    margin-bottom: 12px;
    color: #999;
    font-size: 1rem;
}

.user-info span {
    font-weight: 700;
    color: #FF0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

/* コンパクトメーター（右側） */
.life-meter-compact {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.meter-svg-compact {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(139, 0, 0, 0.6));
}

.meter-marker-compact {
    position: absolute;
    bottom: 20px;
    left: 10%;
    transform: translateX(-50%);
    transition: left 2s ease;
}

.meter-marker-compact .marker-dot {
    width: 24px;
    height: 24px;
    background: #FF0000;
    border-radius: 50%;
    margin: 0 auto;
    animation: markerPulse 2s infinite;
    border: 3px solid #8B0000;
    position: relative;
}

.meter-marker-compact .marker-dot::before {
    content: '💀';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

.countdown-display h2 {
    text-align: center;
    color: #8B0000;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.countdown-display h2::before {
    content: '⚰️ ';
}

.countdown-display h2::after {
    content: ' ⚰️';
}

/* カウントダウングリッド */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.countdown-item {
    background: rgba(139, 0, 0, 0.15);
    border: 2px solid rgba(139, 0, 0, 0.4);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 
        0 0 15px rgba(139, 0, 0, 0.4),
        0 5px 20px rgba(0, 0, 0, 0.7),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.countdown-item:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 25px rgba(139, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.8);
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8B0000, transparent);
    box-shadow: 0 0 10px #8B0000;
}

/* 各時間単位ごとの色分け - 赤系グラデーション */
.countdown-item:nth-child(1) .countdown-value {
    color: #FF0000;
    text-shadow: 0 0 25px rgba(255, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.5);
    font-size: 3.5rem;
}

.countdown-item:nth-child(2) .countdown-value {
    color: #FF1a1a;
    text-shadow: 0 0 25px rgba(255, 26, 26, 0.8);
}

.countdown-item:nth-child(3) .countdown-value {
    color: #FF3333;
    text-shadow: 0 0 25px rgba(255, 51, 51, 0.8);
}

.countdown-item:nth-child(4) .countdown-value {
    color: #FF4d4d;
    text-shadow: 0 0 25px rgba(255, 77, 77, 0.8);
}

.countdown-item:nth-child(5) .countdown-value {
    color: #FF6666;
    text-shadow: 0 0 25px rgba(255, 102, 102, 0.8);
}

.countdown-item:nth-child(6) .countdown-value {
    color: #FF8080;
    text-shadow: 0 0 25px rgba(255, 128, 128, 0.8);
    animation: urgentBlink 1s infinite;
}

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

.countdown-value {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
}



.countdown-label {
    font-size: 1rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 換算セクション */
.conversion-section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(139, 0, 0, 0.1);
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.conversion-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #8B0000;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.conversion-title::before {
    content: '⌛ ';
}

.conversion-title::after {
    content: ' ⌛';
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.conversion-item {
    background: rgba(139, 0, 0, 0.15);
    border: 2px solid rgba(139, 0, 0, 0.3);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 
        0 0 10px rgba(139, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.conversion-item:hover {
    background: rgba(139, 0, 0, 0.25);
    transform: translateY(-3px);
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.5),
        0 10px 25px rgba(0, 0, 0, 0.5);
}

.conversion-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #FF0000;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 50%;
    border: 2px solid rgba(139, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
}

.conversion-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #FF0000;
    margin-bottom: 5px;
    word-break: break-all;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.conversion-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
}

/* メッセージボックス */
.message-box {
    background: rgba(139, 0, 0, 0.2);
    border: 2px solid rgba(139, 0, 0, 0.5);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.message-box::before {
    content: '☠️';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    opacity: 0.5;
    animation: float 3s infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes urgentPulse {
    0%, 100% { 
        transform: scale(1);
        border-color: rgba(255, 0, 0, 0.8);
    }
    50% { 
        transform: scale(1.02);
        border-color: rgba(255, 0, 0, 1);
    }
}

.message-box p {
    font-size: 1.1rem;
    color: #FF6666;
    font-style: italic;
    line-height: 1.8;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 102, 102, 0.5);
}

/* フッター */
/* バージョンリンク */
.version-links {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.version-links h3 {
    color: #8B0000;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.8);
    font-weight: 900;
}

.version-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.version-card {
    background: rgba(10, 0, 0, 0.8);
    border: 2px solid rgba(139, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.version-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8B0000, transparent);
}

.version-card:hover {
    transform: translateY(-5px);
    border-color: #FF0000;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.5);
}

.version-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(139, 0, 0, 0.8));
}

.version-card h4 {
    color: #FF0000;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.version-card p {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer {
    text-align: center;
    color: #8B0000;
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
    font-style: italic;
}

/* メーター共通スタイル */
.meter-bg {
    stroke: rgba(139, 0, 0, 0.2);
    stroke-width: 26;
}

.meter-progress {
    stroke: url(#meterGradientCompact);
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 2s ease;
}

.meter-percentage {
    font-size: 36px;
    font-weight: 900;
    fill: #FF0000;
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 1));
}

.meter-label {
    font-size: 13px;
    fill: #8B0000;
    font-weight: 600;
    text-transform: uppercase;
}

@keyframes markerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 30px rgba(255, 0, 0, 1),
            0 0 50px rgba(255, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.4);
        box-shadow: 
            0 0 40px rgba(255, 0, 0, 1), 
            0 0 60px rgba(255, 0, 0, 0.8),
            0 0 80px rgba(255, 0, 0, 0.5);
    }
}

/* ユーティリティ */
.hidden {
    display: none !important;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .conversion-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .countdown-value {
        font-size: 2rem;
    }

    .form-card, .countdown-card {
        padding: 25px;
    }

    .info-meter-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .life-meter-compact {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .countdown-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 1.5rem;
    }
}