* {
    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;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: #1a1a1a;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    color: #666;
}

main {
    max-width: 1200px;
    margin: 0 auto;
}

.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;
}

.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;
}



.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;
}

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

.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;
}

.input-group .primary-btn {
    margin-top: 10px;
}

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;
}

/* Special styling for date inputs */
input[type="text"]#target-date,
input[type="text"]#past-date {
    padding: 16px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    background: #fafafa;
    transition: all 0.2s ease;
}

input[type="text"]#target-date:focus,
input[type="text"]#past-date:focus {
    outline: none;
    border-color: #1a1a1a;
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

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;
}

.primary-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 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;
}

.markdown-output {
    margin-top: 15px;
}

.markdown-textarea {
    width: 100%;
}

.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;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tool-section {
        padding: 20px;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
