:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --accent: #fd79a8;
    --dark: #2d3436;
    --darker: #1e272e;
    --light: #f5f6fa;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --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: var(--darker);
    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.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.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-controls {
    background: rgba(44, 44, 44, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.dice-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;
}

.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(108, 92, 231, 0.5);
}

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

.modifiers {
    margin-top: 25px;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary);
    font-weight: 500;
}

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

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3);
}

.roll-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.roll-btn:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(253, 121, 168, 0.3);
}

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

.dice-results {
    background: rgba(44, 44, 44, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.result-display {
    min-height: 200px;
    background: var(--dark);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dice-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

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

.dice.rolling {
    animation: roll 0.8s 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); }
}

.total-result {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 15px;
}

.history {
    margin-top: 30px;
}

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

.history-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    background: var(--dark);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    transition: var(--transition);
}

.history-item:hover {
    background: rgba(108, 92, 231, 0.2);
}

.history-item .dice-type {
    color: var(--accent);
    font-weight: 600;
}

.history-item .result {
    font-weight: 700;
}

.clear-history {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.clear-history:hover {
    color: #ff7675;
}



/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

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


 /* ===== ARTICLE SPECIFIC STYLES - NO BODY STYLES ===== */
 #diceroller-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 */
    .diceroller-guide-hero {
      text-align: center;
      margin-bottom: 2.5rem;
      padding: 2rem 1.5rem;
      background: linear-gradient(135deg, #2d3436 0%, #6c5ce7 100%);
      border-radius: 32px;
      box-shadow: 0 12px 30px rgba(108, 92, 231, 0.3);
    }

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

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

    .diceroller-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;
    }

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

    /* Main Content */
    .diceroller-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(108, 92, 231, 0.2);
    }

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

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

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

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

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

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

    .diceroller-highlight-box {
      background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(253, 121, 168, 0.05));
      border-left: 6px solid #fd79a8;
      padding: 1.25rem 1.5rem;
      border-radius: 20px;
      margin: 1.75rem 0;
    }

    .diceroller-pro-tip {
      background: rgba(108, 92, 231, 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(108, 92, 231, 0.3);
    }

    .diceroller-pro-tip i {
      font-size: 1.8rem;
      color: #fd79a8;
    }

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

    .diceroller-stat-card {
      background: #f5f7fa;
      border-radius: 20px;
      padding: 1.2rem;
      text-align: center;
      transition: all 0.2s;
      border: 1px solid rgba(108, 92, 231, 0.2);
    }

    .diceroller-stat-card .stat-number {
      font-size: 2rem;
      font-weight: 800;
      color: #6c5ce7;
      margin-bottom: 0.25rem;
    }

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

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

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

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

    .diceroller-probability-table th, .diceroller-probability-table td {
      padding: 12px 16px;
      text-align: left;
      border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    }

    .diceroller-probability-table th {
      background: rgba(108, 92, 231, 0.1);
      font-weight: 600;
      color: #6c5ce7;
    }

    .diceroller-probability-table tr:hover {
      background: rgba(253, 121, 168, 0.05);
    }

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

    .diceroller-app-card {
      background: #f5f7fa;
      border-radius: 16px;
      padding: 1.2rem;
      border: 1px solid rgba(108, 92, 231, 0.2);
      transition: all 0.2s;
    }

    .diceroller-app-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(108, 92, 231, 0.1);
    }

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

    .diceroller-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) {
      .diceroller-guide-hero h2 {
        font-size: 2rem;
      }
      .diceroller-main-content {
        padding: 1.5rem;
      }
      #diceroller-guide-article {
        padding: 1rem;
      }
    }