@import url('https://fonts.googleapis.com/css2?family=Titan+One&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #FFFFFF;
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
    width: 100%;
}

h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 0 0 20px 0;
}

.server-config {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #888;
}

.server-config input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    width: 250px;
    outline: none;
    transition: border-color 0.2s;
}

.server-config input:focus {
    border-color: rgba(255,255,255,0.4);
}

.category-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.cat-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cat-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.cat-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 20px 40px 20px;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

.card {
    background: #1e1e1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    height: 380px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-header {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    z-index: 5;
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ddd;
    padding: 5px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
}

.copy-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Preview Styles */
.card-preview {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    margin: 0 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.03);
    position: relative;
}

.preview-win {
    font-family: 'Titan One', cursive, sans-serif;
    font-size: 32px;
    color: #FF1111;
    -webkit-text-stroke: 1.5px #000;
    text-shadow: 0px 3px 6px rgba(0,0,0,0.6);
    letter-spacing: 1px;
}

.preview-timer {
    font-family: 'Titan One', cursive, sans-serif;
    font-size: 36px;
    color: #FFFFFF;
    -webkit-text-stroke: 1.5px #000;
    text-shadow: 0px 3px 6px rgba(0,0,0,0.6);
    letter-spacing: 1px;
    transition: color 0.2s;
}

.preview-timer.danger {
    color: #FF1111;
}

.preview-tower {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.preview-icon {
    font-size: 20px;
    margin: 2px 0;
}

.preview-floor-box {
    width: 32px;
    height: 20px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 1.5px solid transparent;
    transition: all 0.3s ease;
}

.preview-floor-box.active {
    background: rgba(0, 200, 200, 0.4);
    border-color: #00FFFF;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.card-footer {
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

.card-content {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 20px;
}

.card-content.empty {
    color: rgba(255, 255, 255, 0.3);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}
