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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 
                 Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.btn-refresh {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-refresh:active {
    transform: translateY(0);
}

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

.btn-icon {
    font-size: 1.3em;
    display: inline-block;
}

.btn-refresh:disabled .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading {
    padding: 60px 30px;
    text-align: center;
    background: #f8f9fa;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading p {
    color: #6c757d;
    font-size: 1.1em;
}

.loading-hint {
    font-size: 0.9em !important;
    margin-top: 10px;
    opacity: 0.7;
}

.error-box {
    margin: 30px;
    padding: 20px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    color: #c33;
}

.error-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.summary-box {
    padding: 30px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.summary-header h2 {
    color: #333;
    font-size: 1.8em;
}

.meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
    color: #6c757d;
    text-align: right;
}

.summary-content {
    color: #333;
    font-size: 1.05em;
    white-space: pre-wrap;
    line-height: 1.8;
}

.summary-content strong {
    color: #667eea;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
    border-top: 1px solid #e9ecef;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 1em;
    }

    .summary-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .meta {
        align-items: flex-start;
        text-align: left;
        margin-top: 10px;
    }

    .btn-refresh {
        padding: 12px 30px;
        font-size: 1em;
    }
}
