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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.description {
    color: #666;
    font-size: 1rem;
}

/* Compact Header for Subpages */
header.header-small {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

header.header-small .header-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    animation: none;
}

header.header-small h1 {
    font-size: 1.2rem;
    margin-bottom: 0;
    text-align: left;
}

header.header-small .description {
    display: none;
}

main {
    padding: 20px 0;
}

main h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
}

main h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
}

main p {
    margin-bottom: 15px;
    line-height: 1.8;
}

main ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

main li {
    margin-bottom: 10px;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.main-nav .nav-link {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.main-nav .nav-link:hover {
    color: #3498db;
    background: #f8f9fa;
}

.main-nav .nav-link-active {
    color: #3498db;
    background: #e8f4fd;
    font-weight: 600;
}

.breadcrumb {
    margin-bottom: 20px;
    padding: 10px 0;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.recording-section,
.preview-section {
    margin-bottom: 30px;
}

.recording-section h2,
.preview-section h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.recording-instruction {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.recording-area {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.timer {
    font-size: 3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 20px;
    font-variant-numeric: tabular-nums;
}

.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 5px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.preview-area {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.preview-area h2 {
    color: #27ae60;
    margin-bottom: 20px;
}

.preview-area audio {
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hidden {
    display: none;
}

.ad-area {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
}

.ad-area::before {
    content: '広告エリア';
    color: #999;
    font-size: 0.9rem;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.footer-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer-content h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.footer-content ul {
    list-style: none;
    margin-bottom: 20px;
}

.footer-content li {
    padding: 5px 0;
    color: #666;
}

.footer-content li::before {
    content: '• ';
    color: #3498db;
}

.footer-content nav {
    margin-bottom: 20px;
}

.footer-content nav a {
    color: #3498db;
    text-decoration: none;
}

.footer-content nav a:hover {
    text-decoration: underline;
}

.copyright {
    color: #999;
    font-size: 0.9rem;
}

.faq-container {
    margin-bottom: 30px;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    list-style: none;
    position: relative;
    padding-right: 50px;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #3498db;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px;
    color: #666;
    line-height: 1.8;
    border-top: 1px solid #eee;
    margin-top: 0;
}

.faq-answer p {
    margin-bottom: 0;
    padding-top: 15px;
}

.howto-steps {
    margin-bottom: 30px;
}

.howto-step {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.step-content p {
    color: #666;
    line-height: 1.8;
}

.troubleshooting-list {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.troubleshooting-list h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.troubleshooting-list ul {
    list-style: none;
    padding: 0;
}

.troubleshooting-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.troubleshooting-list li:last-child {
    border-bottom: none;
}

.troubleshooting-list strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.troubleshooting-list p {
    color: #666;
    margin-bottom: 0;
}

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

    .timer {
        font-size: 2.5rem;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100%;
        margin: 5px 0;
    }

    .actions {
        flex-direction: column;
    }

    .container {
        padding: 15px;
    }

    .recording-area,
    .preview-area {
        padding: 20px;
    }

    .howto-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }
}
