:root {
    --primary: #8e44ad;
    --secondary: #9b59b6;
    --accent: #e74c3c;
    --dark: #2c3e50;
    --darker: #1a252f;
    --light: #ecf0f1;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

.main-container {
    background: linear-gradient(135deg, var(--darker) 0%, #0d1b2a 100%);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
    padding: 20px;
}

.container {
    width: 95%;
    margin: 0 auto;
    padding: 20px;
}

.header-title {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    color: var(--secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.dice-creator {
    background: rgba(44, 44, 44, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.dice-type-selector {
    margin-bottom: 20px;
}

.dice-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.dice-btn {
    background: var(--dark);
    border: 2px solid var(--primary);
    color: var(--light);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 120px;
}

.dice-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.dice-btn.active {
    background: var(--primary);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(142, 68, 173, 0.5);
}

.dice-btn i {
    font-size: 1.2rem;
}

.dice-faces-editor {
    margin-top: 25px;
}

.face-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.face-input {
    flex: 1;
    min-width: 120px;
}

.face-input input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--dark);
    background: var(--dark);
    color: var(--light);
    font-size: 1rem;
    transition: var(--transition);
}

.face-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.3);
}

.add-face-btn, .remove-face-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    height: 40px;
}

.add-face-btn {
    background: var(--success);
    color: white;
}

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

.dice-preview {
    background: var(--dark);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.preview-dice {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    transition: all 0.5s ease;
}

.preview-dice.color-mode {
    border-radius: 50%;
}

.dice-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.action-btn {
    padding: 12px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

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

.save-dice-btn:hover {
    background: #7d3c98;
}

.reset-dice-btn {
    background: var(--warning);
    color: white;
}

.reset-dice-btn:hover {
    background: #da8b0c;
}

.dice-roller {
    background: rgba(44, 44, 44, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.selected-dices {
    margin-bottom: 20px;
}

.selected-dice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.selected-dice-item {
    background: var(--dark);
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.selected-dice-item .dice-icon {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.remove-dice-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    margin-left: 5px;
    font-size: 1.1rem;
}

.roll-results {
    min-height: 250px;
    background: var(--dark);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.dice-results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px 0;
    min-height: 180px;
    align-items: center;
}

.result-dice {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.5s ease-out;
    /*filter: blur(8px);*/
}

.result-dice.rolling {
    animation: roll 1s ease-out;
}

@keyframes roll {
    0% { transform: rotate(0deg) scale(1); filter: blur(8px); }
    50% { transform: rotate(180deg) scale(1.2); filter: blur(5px); }
    100% { transform: rotate(360deg) scale(1); filter: blur(0); }
}

.result-dice.color-result {
    border-radius: 50%;
}

.color-badge {
    position: absolute;
    bottom: -20px;
    font-size: 0.7rem;
    background: var(--dark);
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.roll-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
}

.roll-btn:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.4);
}

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

.saved-dices {
    margin-top: 30px;
}

.saved-dices-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.saved-dice-item {
    background: var(--dark);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--primary);
    flex: 1;
    min-width: 160px;
}

.saved-dice-item:hover {
    background: rgba(142, 68, 173, 0.2);
    transform: translateY(-3px);
}

.saved-dice-item.selected {
    background: rgba(142, 68, 173, 0.4);
    border-color: var(--accent);
}



.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--secondary);
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .dice-btn {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .result-dice {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .preview-dice {
        width: 70px;
        height: 70px;
    }
}

 /* ===== ARTICLE SPECIFIC STYLES - NO BODY STYLES ===== */
 #dice-guide-article {
      width: 95%;
      margin: 0 auto;
      padding: 2rem 1.5rem 3rem 1.5rem;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }

    /* Hero Section */
    .dice-guide-hero {
      text-align: center;
      margin-bottom: 2.5rem;
      padding: 2rem 1.5rem;
      background: linear-gradient(135deg, #2c3e50 0%, #8e44ad 100%);
      border-radius: 32px;
      box-shadow: 0 12px 30px rgba(142, 68, 173, 0.3);
    }

    .dice-guide-hero h2 {
      font-size: 2.6rem;
      font-weight: 800;
      background: linear-gradient(90deg, #ecf0f1, #e74c3c);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      margin-bottom: 1rem;
      letter-spacing: -0.02em;
      font-family: 'Orbitron', serif;
    }

    .dice-guide-hero .dice-hero-sub {
      font-size: 1.2rem;
      color: rgba(255, 255, 255, 0.9);
      max-width: 720px;
      margin: 0 auto;
      line-height: 1.5;
    }

    .dice-guide-meta {
      display: flex;
      justify-content: center;
      gap: 2rem;
      color: rgba(255, 255, 255, 0.8);
      font-weight: 500;
      margin-top: 1.2rem;
      flex-wrap: wrap;
    }

    .dice-guide-meta span i {
      margin-right: 0.5rem;
    }

    /* Main Content */
    .dice-main-content {
      background: white;
      border-radius: 28px;
      padding: 2rem 2rem 2.5rem 2rem;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
      border: 1px solid rgba(142, 68, 173, 0.2);
    }

    .dice-main-content h2 {
      font-size: 1.8rem;
      font-weight: 700;
      margin-top: 2rem;
      margin-bottom: 1rem;
      color: #8e44ad;
      border-left: 5px solid #e74c3c;
      padding-left: 1rem;
      font-family: 'Orbitron', serif;
    }

    .dice-main-content h2:first-of-type {
      margin-top: 0;
    }

    .dice-main-content h3 {
      font-size: 1.35rem;
      font-weight: 600;
      margin: 1.5rem 0 0.75rem 0;
      color: #e74c3c;
    }

    .dice-main-content p {
      font-size: 1.05rem;
      color: #2d3748;
      margin-bottom: 1.2rem;
      line-height: 1.6;
    }

    .dice-main-content ul, .dice-main-content ol {
      margin: 1rem 0 1.2rem 1.8rem;
      color: #2d3748;
      line-height: 1.6;
    }

    .dice-main-content li {
      margin-bottom: 0.5rem;
    }

    .dice-highlight-box {
      background: linear-gradient(135deg, rgba(142, 68, 173, 0.08), rgba(231, 76, 60, 0.05));
      border-left: 6px solid #e74c3c;
      padding: 1.25rem 1.5rem;
      border-radius: 20px;
      margin: 1.75rem 0;
    }

    .dice-pro-tip {
      background: rgba(142, 68, 173, 0.1);
      border-radius: 20px;
      padding: 1.2rem 1.5rem;
      margin: 1.5rem 0;
      display: flex;
      gap: 1rem;
      align-items: flex-start;
      border: 1px solid rgba(142, 68, 173, 0.3);
    }

    .dice-pro-tip i {
      font-size: 1.8rem;
      color: #e74c3c;
    }

    .dice-stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1.2rem;
      margin: 2rem 0;
    }

    .dice-stat-card {
      background: #f5f7fa;
      border-radius: 20px;
      padding: 1.2rem;
      text-align: center;
      transition: all 0.2s;
      border: 1px solid rgba(142, 68, 173, 0.2);
    }

    .dice-stat-card .stat-number {
      font-size: 2rem;
      font-weight: 800;
      color: #8e44ad;
      margin-bottom: 0.25rem;
    }

    .dice-quote-block {
      background: #f5f7fa;
      padding: 1.5rem;
      border-radius: 24px;
      text-align: center;
      font-style: italic;
      margin: 1.5rem 0;
      border: 1px solid rgba(142, 68, 173, 0.2);
    }

    .dice-quote-block i {
      font-size: 2rem;
      color: #e74c3c;
      margin-bottom: 0.5rem;
      display: inline-block;
    }

    .dice-table-wrapper {
      overflow-x: auto;
      margin: 1.5rem 0;
    }

    .dice-types-table {
      width: 100%;
      border-collapse: collapse;
      background: #f5f7fa;
      border-radius: 16px;
      overflow: hidden;
    }

    .dice-types-table th, .dice-types-table td {
      padding: 12px 16px;
      text-align: left;
      border-bottom: 1px solid rgba(142, 68, 173, 0.2);
    }

    .dice-types-table th {
      background: rgba(142, 68, 173, 0.1);
      font-weight: 600;
      color: #8e44ad;
    }

    .dice-types-table tr:hover {
      background: rgba(231, 76, 60, 0.05);
    }

    .dice-applications-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.2rem;
      margin: 1.5rem 0;
    }

    .dice-app-card {
      background: #f5f7fa;
      border-radius: 16px;
      padding: 1.2rem;
      border: 1px solid rgba(142, 68, 173, 0.2);
      transition: all 0.2s;
    }

    .dice-app-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(142, 68, 173, 0.1);
    }

    .dice-app-title {
      font-weight: 700;
      color: #8e44ad;
      margin-bottom: 0.5rem;
      font-size: 1.1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .dice-footer-note {
      margin-top: 2.5rem;
      text-align: center;
      font-size: 0.85rem;
      color: #718096;
      border-top: 1px solid #e2e8f0;
      padding-top: 2rem;
    }

    @media (max-width: 768px) {
      .dice-guide-hero h2 {
        font-size: 2rem;
      }
      .dice-main-content {
        padding: 1.5rem;
      }
      #dice-guide-article {
        padding: 1rem;
      }
    }