body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

header h1 {
    color: #ff6600;
}

.disclaimer {
    background-color: #fffacd;
    border: 1px solid #f0e68c;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 0.9em;
    text-align: left;
}

section {
    margin-bottom: 20px;
}

h2 {
    color: #ff6600;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
}

input[type="text"] {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

button {
    background-color: #ff6600;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #e65c00;
}

#search-results, #ics-link-container {
    margin-top: 10px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
}

#search-results ul {
    padding-left: 0;
    max-height: 12em; /* Approximately 8 lines */
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
}

#search-results li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    list-style-type: none;
}

#search-results li:hover {
    background-color: #dcf0ff;
}

code {
    background-color: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "Courier New", Courier, monospace;
}

details {
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    padding: 10px;
}

summary {
    cursor: pointer;
    font-weight: bold;
}

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

ul li {
    margin-bottom: 10px;
}

a {
    color: #ff6600;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#ics-actions-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

#copy-ics-btn {
    padding: 8px 12px;
    font-size: 20px;
    background-color: #e9ecef;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

#copy-ics-btn:hover {
    background-color: #dcdcdc;
}

.buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.calendar-btn {
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: white !important;
    font-weight: bold;
    display: inline-block;
    text-align: center;
}

.google-btn { background-color: #4285F4; }
.outlook-btn { background-color: #0072C6; }
.apple-btn { background-color: #000000; }


.link-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.link-wrapper a {
    word-break: break-all;
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    #copy-ics-btn {
        background-color: #444;
        border-color: #555;
        color: #e0e0e0;
    }

    #copy-ics-btn:hover {
        background-color: #5a5a5a;
    }

    .apple-btn {
        background-color: #f0f0f0;
        color: #121212 !important;
    }

    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .container {
        background: #1e1e1e;
        box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }

    header {
        border-bottom: 1px solid #333;
    }

    header h1, h2 {
        color: #bb86fc;
    }

    h2 {
        border-bottom: 1px solid #333;
    }

    input[type="text"] {
        background-color: #333;
        color: #e0e0e0;
        border: 1px solid #555;
    }

    button {
        background-color: #bb86fc;
        color: #121212;
    }

    button:hover {
        background-color: #a06cd5;
    }

    #search-results, #ics-link-container {
        background-color: #333;
    }

    #search-results li {
        border-bottom: 1px solid #555;
    }

    #search-results li:hover {
        background-color: #4a4a4a;
    }

    code {
        background-color: #333;
    }

    details {
        background-color: #2c2c2c;
        border: 1px solid #444;
    }

    a {
        color: #bb86fc;
    }

    .disclaimer {
        background-color: #3e3e3e;
        border-color: #5c5c5c;
        color: #dcdcdc;
    }
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

th {
    background-color: #f2f2f2;
}

@media (prefers-color-scheme: dark) {
    th, td {
        border-bottom: 1px solid #333;
    }

    th {
        background-color: #2c2c2c;
    }
}