:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --wheel-border: #ffffff;
    --modal-bg: rgba(30, 41, 59, 0.85);
    --modal-card-bg: #1e293b;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    padding: 20px;
}

.layout-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1400px;
    gap: 30px;
    justify-content: space-between;
    align-items: stretch;
}

.side-panel {
    flex: 0 0 280px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.side-panel h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #94a3b8;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 20px 0;
}

/* Left panel controls */
.control-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-container input:focus {
    border-color: var(--primary-color);
}

.dropdown-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 50;
    box-shadow: 0 10px 15px rgba(0,0,0,0.5);
}

.dropdown-results.hidden {
    display: none;
}

.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.2);
}

.manual-add-form {
    margin-top: 10px;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.manual-add-form.hidden {
    display: none;
}

.manual-add-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.manual-add-form input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: inherit;
    outline: none;
}

.random-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.random-container input {
    width: 70px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    outline: none;
}

.small-btn {
    padding: 8px 15px;
    font-size: 1rem;
}

/* Lists */
.verb-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
    margin-bottom: 10px;
}

#wheel-verbs-list {
    max-height: 320px; /* ~6 items */
    overflow-y: auto;
}

#selected-verbs-list {
    max-height: 550px; /* ~10 items */
    overflow-y: auto;
}

.verb-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.verb-list li .verb-info {
    display: flex;
    flex-direction: column;
}

.verb-list li .present-text {
    font-weight: 700;
    color: #60a5fa;
    font-size: 1.1rem;
}

.verb-list li .past-text {
    font-weight: 600;
    color: #34d399;
    font-size: 0.9rem;
}

.remove-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.remove-btn:hover {
    background: var(--danger-color);
    color: white;
}

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


.app-container {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    color: #94a3b8;
}

.wheel-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.pointer {
    position: absolute;
    /* Move to 12 o'clock position and point down */
    left: 50%;
    top: -40px;
    transform: translateX(-50%) rotate(90deg);
    width: 60px;
    height: 60px;
    color: white;
    z-index: 10;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
}

.wheel-container {
    position: relative;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    border: 8px solid var(--wheel-border);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0,0,0,0.5);
    background-color: #fff;
    overflow: hidden;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 4s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 50%;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #333;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 4px solid #f1f5f9;
}

.wheel-segment-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 20px;
    margin-top: -10px;
    transform-origin: 0% 50%;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    text-align: right;
    padding-right: 35px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.btn {
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    background-color: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: white;
}

.secondary-btn:hover {
    background-color: var(--secondary-hover);
}

.danger-btn {
    background-color: var(--danger-color);
    color: white;
}

.danger-btn:hover {
    background-color: var(--danger-hover);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--modal-card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0) scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(50px) scale(0.9);
}

.modal-title {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.verb-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    min-height: 120px;
    justify-content: center;
}

.verb {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.verb.present {
    color: #60a5fa;
}

.verb.past {
    color: #34d399;
}

.verb.hidden {
    opacity: 0;
    transform: translateY(10px);
    display: none;
}

.sentence-container {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: opacity 0.3s ease;
}

.sentence-container.hidden {
    display: none;
    opacity: 0;
}

.sentence-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #e2e8f0;
    font-weight: 400;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.modal-actions .hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1000px) {
    .layout-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .side-panel {
        width: 100%;
        max-width: 500px;
        flex: none;
    }
    .verb-list {
        max-height: 200px;
    }
}

@media (max-width: 600px) {
    .wheel-container {
        width: 300px;
        height: 300px;
    }
    .pointer {
        width: 40px;
        height: 40px;
        top: -20px;
    }
    .wheel-segment-text {
        font-size: 0.9rem;
        padding-right: 15px;
    }
    header h1 {
        font-size: 2rem;
    }
}
