* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000428 0%, #004e92 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #e0e0e0;
}

/* ヘッダー */
.main-header {
    background: rgba(10, 15, 35, 0.95);
    padding: 15px 30px;
    box-shadow: 0 2px 20px rgba(0, 136, 229, 0.3);
    border-bottom: 2px solid rgba(30, 136, 229, 0.5);
}

.header-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #42a5f5;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.header-link:hover {
    color: #64b5f6;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

h1 {
    font-size: 2rem;
    color: #42a5f5;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(66, 165, 245, 0.5);
}

.subtitle {
    font-size: 0.9rem;
    color: #90caf9;
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 20px auto;
    padding: 0 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(66, 165, 245, 0.3);
}

.content {
    background: rgba(15, 25, 45, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 136, 229, 0.2);
    border: 1px solid rgba(66, 165, 245, 0.3);
}

.result-card {
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.9) 0%, rgba(27, 38, 59, 0.9) 100%);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid rgba(66, 165, 245, 0.2);
    box-shadow: 0 2px 15px rgba(0, 136, 229, 0.15);
}

.rotation-count {
    font-size: 3rem;
    font-weight: bold;
    color: #64b5f6;
    margin: 15px 0;
    word-break: break-all;
    text-shadow: 0 0 15px rgba(100, 181, 246, 0.6);
}

.phase-info {
    font-size: 1.5rem;
    color: #4dd0e1;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(77, 208, 225, 0.4);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(66, 165, 245, 0.2);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    color: #90caf9;
}

.info-value {
    color: #e0e0e0;
}

.description {
    background: rgba(10, 20, 35, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #b0bec5;
    line-height: 1.6;
    border: 1px solid rgba(66, 165, 245, 0.15);
}

.description a {
    color: #64b5f6;
    text-decoration: none;
    border-bottom: 1px solid rgba(100, 181, 246, 0.3);
    transition: all 0.3s;
}

.description a:hover {
    color: #90caf9;
    border-bottom-color: #90caf9;
}

.info-section {
    margin-bottom: 15px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.warning-section {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 167, 38, 0.3);
    color: #ffb74d;
}

.controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary {
    background: #1e88e5;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(66, 165, 245, 0.2);
    color: #90caf9;
    border: 1px solid rgba(66, 165, 245, 0.5);
}

.btn-secondary:hover {
    background: rgba(66, 165, 245, 0.3);
    border-color: #42a5f5;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    color: #90caf9;
}

.mode-indicator {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 10px;
}

.mode-offline {
    background: rgba(255, 167, 38, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 167, 38, 0.4);
}

.mode-online {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.update-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(66, 165, 245, 0.2);
    color: #90caf9;
    font-size: 0.85rem;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    color: #90caf9;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(66, 165, 245, 0.2);
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #e0e0e0;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1e88e5;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.loading {
    display: inline-block;
    margin-left: 10px;
    color: #42a5f5;
}

/* トースト通知 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 25, 45, 0.95);
    color: #e0e0e0;
    padding: 15px 30px;
    border-radius: 8px;
    border: 1px solid rgba(66, 165, 245, 0.5);
    box-shadow: 0 4px 20px rgba(0, 136, 229, 0.4);
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast.success {
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.toast.error {
    border-color: rgba(244, 67, 54, 0.5);
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.4);
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
    }

    .rotation-count {
        font-size: 2rem;
    }

    .phase-info {
        font-size: 1.2rem;
    }

    .content {
        padding: 20px;
    }
}
