/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Top Navigation */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-home:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb-separator {
    color: #999;
    font-weight: 300;
}

.current-tool {
    color: #667eea;
    font-weight: 500;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px 30px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    background: linear-gradient(90deg, #667eea, #764ba2, #45b7d1, #ff6b6b, #667eea);
    background-size: 400% 400%;
    animation: headerGradient 12s ease-in-out infinite;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 24px rgba(102,126,234,0.10);
    padding-top: 24px;
    padding-bottom: 18px;
}

@keyframes headerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-die {
    display: inline-block;
    font-size: 2.2rem;
    margin-right: 6px;
    animation: dieRoll 2.5s cubic-bezier(.68,-0.55,.27,1.55) infinite;
    will-change: transform;
    transition: filter 0.2s, transform 0.2s;
    cursor: pointer;
}
.logo-die:hover, .logo-die:focus {
    animation: dieRollFast 0.7s cubic-bezier(.68,-0.55,.27,1.55) infinite;
    filter: drop-shadow(0 0 8px #fff) brightness(1.2);
    transform: scale(1.18) rotate(12deg);
}
@keyframes dieRollFast {
    0% { transform: rotate(0deg) scale(1); }
    20% { transform: rotate(-40deg) scale(1.2); }
    40% { transform: rotate(40deg) scale(1.3); }
    60% { transform: rotate(-30deg) scale(1.1); }
    80% { transform: rotate(20deg) scale(1.15); }
    100% { transform: rotate(0deg) scale(1); }
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation Tabs */
.nav-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 15px 10px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tab-icon {
    font-size: 1.5rem;
}

.tab-text {
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    flex: 1;
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.tool-section {
    display: none;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.5s, transform 0.5s;
}

.tool-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: fadeIn 0.5s ease;
}

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

.tool-header {
    text-align: center;
    margin-bottom: 20px;
}

.tool-header h2 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 8px;
}

.tool-header p {
    color: #666;
    font-size: 1.25rem;
}

/* Form Elements */
.category-selector {
    margin-bottom: 25px;
}

.category-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.custom-options {
    margin-top: 20px;
}

.custom-options small {
    color: #666;
    margin-top: 5px;
    display: block;
}

/* Buttons */
.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.generate-btn.loading .btn-text {
    opacity: 0;
}

.generate-btn.loading .btn-spinner {
    display: inline-block !important;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
}

/* Sub-tabs for Dice & Coin */
.dice-coin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.sub-tab-btn {
    flex: 1;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sub-tab-btn:hover {
    background: #e9ecef;
}

.sub-tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.sub-tool {
    display: none;
}

.sub-tool.active {
    display: block;
}

/* Result Displays */
.result-display {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e1e5e9;
    transition: all 0.3s ease;
}

.result-display.has-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    animation: resultAppear 0.6s ease;
}

@keyframes resultAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.result-text {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}

.result-meta {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.3;
}

/* Quote specific styling */
.quote-result.has-result {
    text-align: left;
    padding: 40px;
    display: block;
}

.quote-text {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.8;
    word-wrap: break-word;
    hyphens: auto;
}

.quote-author {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: right;
    margin-top: 15px;
}

.quote-author::before {
    content: "— ";
}

/* Dice Display */
.dice-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.die {
    width: 80px;
    height: 80px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    animation: diceRoll 0.8s ease;
}

@keyframes diceRoll {
    0%, 100% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(90deg) rotateY(0deg); }
    50% { transform: rotateX(180deg) rotateY(90deg); }
    75% { transform: rotateX(270deg) rotateY(180deg); }
}

/* Coin Display */
.coin-display {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.coin {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 4px solid #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: #92400e;
    animation: coinFlip 1s ease;
}

@keyframes coinFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

/* Action Buttons */
.quote-actions, .activity-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.action-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Wheel Spinner */
.wheel-input-section {
    margin-bottom: 30px;
}

.add-item-container {
    display: flex;
    gap: 10px;
}

#wheel-item-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

#wheel-item-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-item-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-item-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

.quick-add-section {
    margin: 20px 0;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.preset-btn {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    padding: 14px 28px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.15rem;
}

.preset-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.wheel-items-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 500;
}

.clear-all-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.clear-all-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

.wheel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.wheel-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-item {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.remove-item:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.no-items {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.wheel-wrapper {
    position: relative;
    width: 500px;
    height: 500px;
    margin-bottom: 20px;
}

#wheel-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-width: 500px;
    min-height: 500px;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1;
    filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 18px #667eea);
    transition: filter 0.3s;
}
.wheel-pointer:hover, .wheel-pointer:focus {
    filter: drop-shadow(0 0 18px #fff) drop-shadow(0 0 32px #764ba2);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}


.wheel-spin-btn {
    margin-top: 20px;
}

.wheel-spin-btn:disabled {
    background: #e1e5e9;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.wheel-actions {
    display: none;
    gap: 15px;
    margin-top: 20px;
}

/* Wheel Spinner Flex Layout */
.wheel-flex-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
}

.wheel-main {
    flex: 1 1 500px;
    min-width: 350px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-sidebar {
    flex: 0 0 380px;
    max-width: 420px;
    min-width: 240px;
    background: #f8f9fa;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(102,126,234,0.08);
    padding: 32px 24px 32px 24px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.wheel-input-section {
    margin-bottom: 0;
}

.wheel-presets-user {
    margin-top: 18px;
    background: #eef2fa;
    border-radius: 8px;
    padding: 16px 12px 12px 12px;
    box-shadow: 0 1px 4px rgba(102,126,234,0.06);
    min-height: 60px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.save-preset-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
    margin-bottom: 10px;
}

#save-preset-name {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1.5px solid #d1d5db;
    font-size: 1rem;
}

#save-preset-btn {
    padding: 8px 14px;
    font-size: 1rem;
    border-radius: 6px;
    background: #667eea;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

#save-preset-btn:hover {
    background: #764ba2;
}

.user-presets-list {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-preset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.98rem;
    box-shadow: 0 1px 2px rgba(102,126,234,0.04);
}

.user-preset-item button {
    background: none;
    border: none;
    color: #667eea;
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: 8px;
    border-radius: 4px;
    padding: 2px 6px;
    transition: background 0.2s;
}

.user-preset-item button:hover {
    background: #eef2fa;
    color: #764ba2;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    padding: 20px 0;
    opacity: 0.8;
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.7;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
    color: #667eea;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 18px;
    right: 24px;
    background: rgba(255,255,255,0.18);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 8px 10px;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}
.theme-toggle:hover, .theme-toggle:focus {
    background: rgba(255,255,255,0.32);
    color: #ffd700;
}

body.dark {
    background: linear-gradient(135deg, #232946 0%, #1a1a2e 100%);
    color: #eaeaea;
}
body.dark .main-content {
    background: #232946;
    color: #eaeaea;
    box-shadow: 0 10px 30px rgba(30,30,60,0.25);
}
body.dark .tool-header h2 {
    color: #ffd700;
}
body.dark .result-display {
    background: #232946;
    color: #ffd700;
    border-color: #393e6e;
}
body.dark .result-display.has-result {
    background: linear-gradient(135deg, #393e6e 0%, #232946 100%);
    color: #ffd700;
}
body.dark .quote-result.has-result {
    background: #232946;
    color: #ffd700;
}
body.dark .wheel-sidebar, body.dark .wheel-items-list, body.dark .wheel-presets-user {
    background: #232946;
    color: #ffd700;
    box-shadow: 0 1px 4px rgba(30,30,60,0.10);
}

body.dark #wheel-item-input {
    background: #393e6e;
    border-color: #4a5080;
    color: #fffbe7;
}

body.dark #wheel-item-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark #wheel-item-input::placeholder {
    color: #a0a6c8;
}
body.dark .user-preset-item {
    background: #393e6e;
    color: #ffd700;
}
body.dark .add-item-btn, body.dark #save-preset-btn {
    background: #ffd700;
    color: #232946;
}
body.dark .add-item-btn:hover, body.dark #save-preset-btn:hover {
    background: #ffb700;
}
body.dark .tab-btn.active {
    background: #ffd700;
    color: #232946;
}
body.dark .tab-btn {
    background: rgba(255,255,255,0.08);
    color: #ffd700;
}
body.dark .nav-tabs {
    background: rgba(30,30,60,0.18);
}
body.dark .footer {
    color: #ffd700;
}
body.dark .modal-content {
    background: #232946;
    color: #ffd700;
}
body.dark .close-btn {
    color: #ffd700;
}
body.dark .close-btn:hover {
    color: #fff;
}
body.dark .wheel-item {
    background: #232946;
    color: #fffbe7;
    border: 1.5px solid #393e6e;
    box-shadow: 0 1px 4px rgba(255,255,255,0.04);
}
body.dark .wheel-item span, body.dark .wheel-item .remove-item {
    color: #fffbe7;
}
body.dark .wheel-item .remove-item:hover {
    background: #393e6e;
    color: #ffd700;
}
body.dark .wheel-wrapper {
    background: #232946;
    border-radius: 50%;
    box-shadow: 0 0 0 6px #232946, 0 2px 16px #000a;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .nav-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }
    
    .tab-btn {
        padding: 12px 8px;
    }
    
    .tab-icon {
        font-size: 1.2rem;
    }
    
    .tab-text {
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .tool-header h2 {
        font-size: 1.6rem;
    }
    
    .tool-header p {
        font-size: 1rem;
    }
    
    .generate-btn {
        font-size: 1.1rem;
        padding: 16px 25px;
    }
    
    .die {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .coin {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .quote-actions, .activity-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-btn {
        width: 100%;
    }

    .result-display {
        padding: 20px;
        min-height: 100px;
    }

    .result-text {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .result-meta {
        font-size: 0.9rem;
    }

    .wheel-wrapper {
        width: 220px;
        height: 220px;
    }

    #wheel-canvas {
        min-width: 220px;
        min-height: 220px;
    }
    
    .preset-buttons {
        gap: 8px;
    }
    
    .preset-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .wheel-flex-layout {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .wheel-main {
        max-width: calc(100vw - 30px);
        max-height: auto;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .wheel-sidebar {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .nav-tabs {
        grid-template-columns: 1fr;
    }
    
    .dice-coin-tabs {
        flex-direction: column;
    }
    
    .dice-display {
        gap: 15px;
    }
    
    .die {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .coin {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .wheel-wrapper {
        width: 200px;
        height: 200px;
    }

    #wheel-canvas {
        min-width: 200px;
        min-height: 200px;
    }

    .add-item-container {
        flex-direction: column;
    }

    .wheel-flex-layout {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .wheel-main {
        max-width: calc(100vw - 40px);
        max-height: auto;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .wheel-sidebar {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .preset-buttons {
        flex-direction: column;
    }
    
    .preset-btn {
        width: 100%;
        text-align: center;
    }
}
