:root {
    --discord-blue: #5865F2;
    --discord-dark: #36393F;
    --discord-darker: #2F3136;
    --discord-gray: #40444B;
    --discord-light-gray: #B9BBBE;
    --discord-white: #FFFFFF;
    --discord-green: #57F287;
    --discord-yellow: #FEE75C;
    --discord-red: #ED4245;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1b26, #2a2b3d);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 10px;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 24px;
    padding: 18px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo i {
    font-size: 2.2rem;
    color: var(--discord-blue);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 6px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 95vw;
    margin: 0 auto 22px;
}

.converter-card {
    background: var(--discord-darker);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

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

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

label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #a0a0c0;
    display: flex;
    align-items: center;
    gap: 6px;
}

input, select {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3b50;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--discord-blue);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}

.result-box {
    background: rgba(0, 0, 0, 0.21);
    border-radius: 8px;
    padding: 15px;
    margin-top: 16px;
    position: relative;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.copy-btn {
    background: var(--discord-blue);
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    font-size: 1rem;
}

.copy-btn:hover {
    background: #4752c4;
}

.copy-btn.copied {
    background: var(--discord-green);
}

.timestamp-preview {
    background: rgba(0, 0, 0, 0.28);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 1.15rem;
    word-break: break-all;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 10px;
}

.format-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
    justify-content: flex-start;
}

.format-btn {
    background: transparent;
    color: #a0a0c0;
    border: 1px solid #3a3b50;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s;
    font-weight: 500;
    font-size: 0.99rem;
}

.format-btn:hover, .format-btn.active {
    background: var(--discord-blue);
    color: white;
    border-color: var(--discord-blue);
}

.preview-section {
    margin-top: 30px;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    font-size: 1.3rem;
    color: #fff;
}

.discord-message {
    background: var(--discord-dark);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    border-left: 4px solid var(--discord-blue);
}

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

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--discord-blue);
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
}

.username {
    font-weight: 600;
    color: #fff;
}

.message-time {
    color: var(--discord-light-gray);
    font-size: 0.85rem;
    margin-left: 8px;
}

.message-content {
    padding-left: 42px;
}

.timestamp-example {
    display: inline-block;
    background: rgba(88, 101, 242, 0.15);
    color: var(--discord-blue);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.table-responsive {
    overflow-x: auto;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--discord-darker);
    border-radius: 8px;
    overflow: hidden;
    min-width: 420px;
}

.preview-table th {
    background: var(--discord-blue);
    color: white;
    padding: 10px;
    text-align: left;
    font-size: 1rem;
}

.preview-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.97rem;
}

.preview-table tr:last-child td {
    border-bottom: none;
}

.format-name {
    font-weight: 500;
    color: #fff;
}

.format-desc {
    color: var(--discord-light-gray);
    font-size: 0.88rem;
    margin-top: 2px;
}

.example-result {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.info-box {
    background: var(--discord-darker);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.info-box h3 {
    margin-bottom: 12px;
    color: #fff;
    font-size: 1.18rem;
}

.new-badge {
    background: var(--discord-blue);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 8px;
}

.example-img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0c0;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 14px;
}

.footer-links a {
    color: #a0a0c0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    font-size: 1rem;
}

.footer-links a:hover {
    color: #fff;
}

/* --------- Responsive Design ----------- */
@media (max-width: 900px) {
    .container {
        max-width: 100%;
        padding: 0 2vw;
    }
    .preview-table {
        min-width: 340px;
    }
}
@media (max-width: 600px) {
    .container {
        padding: 0 6px;
        max-width: 100vw;
    }
    h1 {
        font-size: 1.3rem;
    }
    .subtitle {
        font-size: 0.96rem;
    }
    .converter-card, .info-box {
        padding: 10px 6px;
    }
    .discord-message, .result-box {
        padding: 9px 4px;
    }
    .input-group {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .table-responsive {
        margin: 0 -4vw;
    }
    .preview-section {
        margin-top: 20px;
    }
    .preview-title {
        font-size: 1rem;
        margin-bottom: 7px;
    }
    .footer-links {
        gap: 8px;
    }
    .example-img {
        margin-top: 9px;
    }
}
