body {
    font-family: 'Roboto', sans-serif;
    background-color: #0e1621;
    color: #dcddde;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #17212b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid #0088cc;
}

.header-left h1 {
    font-size: 26px;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-text {
    font-size: 14px;
    color: #b9bbbe;
    font-weight: 600;
}

.discord-link {
    color: #5865F2;
    font-size: 24px;
    transition: all 0.3s ease;
}

.discord-link:hover {
    color: #ffffff;
    transform: scale(1.1) rotate(5deg);
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.8);
}

.github-link {
    color: #ffffff;
    font-size: 24px;
    transition: all 0.3s ease;
}

.github-link:hover {
    color: #b9bbbe;
    transform: scale(1.1) rotate(-5deg);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background-color: #17212b;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 60px; 
}

textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    border: 2px solid #0e1621;
    border-radius: 8px;
    background-color: #0e1621;
    color: #ffffff;
    font-size: 14px;
    resize: vertical;
    font-family: 'Roboto Mono', monospace;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: #0088cc;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

button {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    background-color: #0088cc;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #006ba1;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

#stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    background-color: #0e1621;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.stat-card {
    text-align: center;
    padding: 10px;
}

.stat-card h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #8e9297;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card p {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
}

#stat-valid { color: #3ba55d; }
#stat-invalid { color: #ed4245; }

#results {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.result-section {
    background-color: #0e1621;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.result-section h2 {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
    border-bottom: 2px solid #17212b;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #17212b;
    padding-bottom: 12px;
    margin-bottom: 15px;
    min-height: 40px;
}

.sm-btn {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #ed4245;
    box-shadow: none;
}

.sm-btn:hover {
    background-color: #c03537;
    transform: translateY(-1px);
}

.link-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    flex-grow: 1;
}

.link-item {
    background-color: #17212b;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 5px solid #444;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.link-item:hover {
    background-color: #1f2b38;
    transform: translateX(2px);
}

.link-item.valid { border-left-color: #0088cc; }
.link-item.invalid { border-left-color: #ed4245; }
.link-item.error { border-left-color: #faa61a; }

.link-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.link-name {
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-details {
    font-size: 13px;
    color: #b9bbbe;
    margin-bottom: 4px;
}

.link-details a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-details a:hover {
    text-decoration: underline;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #17212b; 
}

::-webkit-scrollbar-thumb {
    background: #0e1621; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a0f16; 
}

/* Mode Switcher */
.mode-switcher {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.mode-btn {
    background-color: transparent;
    border: 2px solid #0088cc;
    color: #0088cc;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.mode-btn:hover {
    background-color: rgba(0, 136, 204, 0.1);
    transform: translateY(-2px);
}

.mode-btn.active {
    background-color: #0088cc;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.4);
}

/* Single Mode Styles */
.single-input-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

#singleLinkInput {
    width: 60%;
    padding: 15px;
    border: 2px solid #0e1621;
    border-radius: 8px;
    background-color: #0e1621;
    color: #ffffff;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#singleLinkInput:focus {
    outline: none;
    border-color: #0088cc;
}

.single-link-card {
    background-color: #0e1621;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

.card-header-image {
    height: 150px;
    background-color: #17212b;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-header-content {
    padding: 20px;
    text-align: center;
    margin-top: -50px;
}

.single-icon-container {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background-color: #17212b;
    border-radius: 25px;
    border: 5px solid #0e1621;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-name {
    margin: 15px 0 5px;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
}

.single-desc {
    color: #b9bbbe;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.4;
    padding: 0 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
    background-color: #17212b;
    margin: 20px;
    border-radius: 8px;
}

.detail-item {
    background-color: #0e1621;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

.detail-label {
    display: block;
    color: #8e9297;
    font-size: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.detail-value {
    color: #dcddde;
    font-weight: 600;
}

.link-actions {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #17212b;
}

.open-link-btn {
    background-color: #0088cc;
    border: none;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.open-link-btn:hover {
    background-color: #006ba1;
    transform: translateY(-2px);
}

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

/* Mobile Tweaks */
@media (max-width: 600px) {
    .single-input-container { flex-direction: column; }
    #singleLinkInput { width: 100%; box-sizing: border-box;}
    .details-grid { grid-template-columns: 1fr; }
}

footer {
    background-color: #17212b;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #0e1621;
    margin-top: auto;
}

.footer-line {
    margin: 5px 0;
    font-size: 14px;
    color: #b9bbbe;
}

.footer-line a {
    color: #0088cc;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.footer-line a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.heart {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 10px;
}
