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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fafafa;
    min-height: 100vh;
}

/* Navigation Header */
.nav-header {
    background: #1a1a1a;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #000;
}

.nav-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}

.nav-header nav {
    display: flex;
    gap: 16px;
}

.nav-header a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border: 2px solid white;
    transition: all 0.2s ease;
}

.nav-header a:hover {
    background: white;
    color: #1a1a1a;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Week Header */
.week-header {
    text-align: center;
    margin-bottom: 30px;
}

.week-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #666;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Analysis Card */
.analysis-card {
    background: white;
    border: 3px solid #1a1a1a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #1a1a1a;
}

.analysis-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 16px 20px;
    background: #1a1a1a;
    color: white;
    border-bottom: 3px solid #000;
}

.analysis-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.analysis-card .date {
    padding: 12px 20px;
    background: #f5f5f5;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    letter-spacing: 0.05em;
}

.analysis-card .excerpt {
    padding: 20px;
    min-height: 100px;
}

.analysis-card .excerpt div {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.analysis-card .read-more {
    display: block;
    padding: 12px 20px;
    background: #f5f5f5;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.2s ease;
}

.analysis-card .read-more:hover {
    background: #e0e0e0;
}

/* Full Analysis Page */
.analysis-full {
    max-width: 800px;
    margin: 0 auto;
}

.analysis-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #1a1a1a;
}

.analysis-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 15px 0;
}

.analysis-header .meta {
    display: flex;
    gap: 20px;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.analysis-header .week {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Frequency Badge */
.frequency-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid;
}

.frequency-badge.daily {
    background: #4CAF50;
    color: white;
    border-color: #388E3C;
}

.frequency-badge.weekly {
    background: #2196F3;
    color: white;
    border-color: #1976D2;
}

.back-link {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #1a1a1a;
}

/* Analysis Content */
.analysis-content {
    background: white;
    padding: 30px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    line-height: 1.8;
}

.analysis-content h1,
.analysis-content h2,
.analysis-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.analysis-content h1 {
    font-size: 1.5rem;
}

.analysis-content h2 {
    font-size: 1.3rem;
}

.analysis-content h3 {
    font-size: 1.1rem;
}

.analysis-content p {
    margin-bottom: 16px;
}

.analysis-content ul,
.analysis-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.analysis-content li {
    margin-bottom: 8px;
}

.analysis-content a {
    color: #1a73e8;
    text-decoration: none;
}

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

.analysis-content strong {
    font-weight: 600;
}

/* Analysis Navigation */
.analysis-nav {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border: 2px solid #1a1a1a;
    display: inline-block;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #1a1a1a;
    color: white;
}

/* Control Panel */
.control-panel {
    max-width: 800px;
    margin: 0 auto;
}

.control-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.control-panel > p {
    color: #666;
    margin-bottom: 30px;
}

.control-info {
    background: white;
    padding: 30px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 30px;
    text-align: center;
}

.control-info p {
    margin-bottom: 20px;
    color: #666;
}

.primary-btn {
    display: inline-block;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.primary-btn:hover {
    background: #333;
}

.primary-btn:active {
    background: #000;
}

.secondary-btn {
    background: #666;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.secondary-btn:hover {
    background: #555;
}

.quick-links {
    background: white;
    padding: 30px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.quick-links h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.quick-links ul {
    list-style: none;
}

.quick-links li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.quick-links li:last-child {
    border-bottom: none;
}

.quick-links a {
    color: #1a73e8;
    text-decoration: none;
}

.quick-links a:hover {
    text-decoration: underline;
}

/* Tool Sections */
.tool-section {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.tool-section h2 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 400;
}

.tool-section p {
    color: #666;
    margin-bottom: 20px;
}

.account-subsection {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.account-subsection:last-child {
    margin-bottom: 0;
}

.account-subsection h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 500;
}

.account-subsection .input-group {
    margin-bottom: 15px;
}

/* Input Styles */
.input-container {
    margin-bottom: 20px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

textarea, input[type="number"], input[type="text"], input[type="password"] {
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: white;
}

textarea:focus, input[type="number"]:focus, input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #333;
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Results Container */
.results-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 4px;
    border-left: 3px solid #1a1a1a;
    display: none;
}

.results-container.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.results-container h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 400;
}

.results-list {
    list-style: none;
}

.results-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.method-name {
    font-weight: 500;
    color: #1a1a1a;
}

.method-value {
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.error {
    color: #d32f2f;
    background: #ffeaea;
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #d32f2f;
}

.success {
    color: #2e7d32;
    background: #e8f5e8;
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #2e7d32;
}

/* List Container Styles */
.list-container {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.list-header {
    display: flex;
    background: #f8f9fa;
    font-weight: 500;
    border-bottom: 2px solid #e5e5e5;
}

.list-header > div {
    padding: 12px;
}

.list-header > div:nth-child(1) {
    flex: 0 0 40%;
}

.list-header > div:nth-child(2) {
    flex: 0 0 20%;
    text-align: center;
}

.list-header > div:nth-child(3) {
    flex: 0 0 40%;
    text-align: right;
}

.list-item {
    border-bottom: 1px solid #f0f0f0;
}

.list-row {
    display: flex;
    align-items: center;
}

.list-row > div {
    padding: 12px;
}

.list-row > div:nth-child(1) {
    flex: 0 0 40%;
}

.list-row > div:nth-child(2) {
    flex: 0 0 20%;
    text-align: center;
}

.list-row > div:nth-child(3) {
    flex: 0 0 40%;
    text-align: right;
}

.list-details {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: none;
}

.list-details.show {
    display: block;
}

.account-chips-container {
    margin-top: 10px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.account-chip {
    display: inline-block;
    background: #fff;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 3px;
    font-size: 0.9em;
    border: 1px solid #ddd;
}

/* Error & Empty States */
.error-container,
.empty-container {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.error {
    color: #d32f2f;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.empty-container p {
    color: #666;
    font-size: 1.1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 600px) {
    .nav-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 16px 20px;
    }

    .nav-header nav {
        width: 100%;
        justify-content: space-between;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .analysis-content {
        padding: 20px;
    }

    main {
        padding: 20px 15px;
    }
}
