:root {
    --primary-color: #00ffcc; /* Neon Cyan */
    --secondary-color: #ff007f; /* Neon Pink */
    --bg-gradient: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --text-muted: #b0bec5;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    font-family: var(--font-body);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 20px;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Typography */
header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    margin-bottom: 10px;
}

h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.placeholder-text {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.input-group label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
}

.actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    width: 100%;
    max-width: 300px;
}

.btn-primary:hover {
    background: #00e6b8;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.6);
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 10px;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-color);
}

/* Results Section */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.info-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.split-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95rem;
}

.split-table th, .split-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.split-table th {
    color: var(--primary-color);
    font-weight: bold;
}

.split-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.badge {
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    vertical-align: middle;
    margin-left: 8px;
}

/* Ad Spaces */
.ad-space {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255,255,255,0.5);
    margin: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    width: 100%;
}
.ad-space.top-ad { min-height: 90px; }
.ad-space.mid-ad { min-height: 250px; }
.ad-space.bottom-ad { min-height: 90px; }

/* Table responsive wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Diary */
.diary-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.diary-tag {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    border: 1px solid rgba(0, 255, 204, 0.3);
}

.diary-tag:hover {
    background: var(--primary-color);
    color: #000;
    transform: scale(1.05);
}

/* Tooltip styles */
#chart-tooltip {
    color: #fff;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}
#chart-tooltip strong {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .info-panels {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2rem;
    }
    .chart-container {
        height: 300px;
    }
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .input-group {
        min-width: 100%;
    }
    .btn-primary {
        max-width: 100%;
    }
    .split-table th, .split-table td {
        padding: 6px;
        font-size: 0.85rem;
    }
}
