{
 "$schema": "http://json-schema.org/draft-07/schema#",
 "$id": "https://painel.furiaplay.com/studio/theme.schema.json",
 "title": "Tema do FuriaPlay (.fptheme)",
 "type": "object",
 "required": [
  "format",
  "pack"
 ],
 "properties": {
  "$schema": {
   "type": "string"
  },
  "format": {
   "const": "furiaplay-theme"
  },
  "v": {
   "const": 1
  },
  "name": {
   "type": "string",
   "maxLength": 40
  },
  "author": {
   "type": "string",
   "maxLength": 60
  },
  "createdAt": {
   "type": "string"
  },
  "pack": {
   "type": "object",
   "additionalProperties": false,
   "properties": {
    "v": {
     "const": 1
    },
    "colors": {
     "type": "object",
     "additionalProperties": false,
     "properties": {
      "bg": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Fundo das telas"
      },
      "surface": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Cards"
      },
      "surface2": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Cards em destaque"
      },
      "border": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Bordas"
      },
      "text": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Texto"
      },
      "textDim": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Texto secundário"
      },
      "textMute": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Texto apagado"
      },
      "primary": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Cor principal (botões, destaques)"
      },
      "onPrimary": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Texto sobre a cor principal"
      },
      "focus": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Cor do foco do controle"
      },
      "live": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$",
       "description": "Selo AO VIVO"
      }
     }
    },
    "font": {
     "type": "object",
     "additionalProperties": false,
     "properties": {
      "title": {
       "enum": [
        "system",
        "archivo",
        "inter",
        "poppins",
        "montserrat",
        "nunito",
        "playfair",
        "bebas"
       ]
      },
      "body": {
       "enum": [
        "system",
        "archivo",
        "inter",
        "poppins",
        "montserrat",
        "nunito",
        "playfair",
        "bebas"
       ]
      }
     }
    },
    "radius": {
     "type": "number",
     "minimum": 0,
     "maximum": 24,
     "description": "Cantos dos cards em px."
    },
    "pill": {
     "type": "boolean",
     "description": "Botões totalmente redondos."
    },
    "focus": {
     "type": "object",
     "additionalProperties": false,
     "properties": {
      "style": {
       "enum": [
        "ring",
        "glow",
        "lift",
        "fill",
        "underline"
       ]
      },
      "scale": {
       "type": "number",
       "minimum": 1,
       "maximum": 1.12
      },
      "width": {
       "type": "number",
       "minimum": 1,
       "maximum": 5
      },
      "color": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$"
      }
     }
    },
    "card": {
     "enum": [
      "flat",
      "outline",
      "glass",
      "raised"
     ]
    },
    "scene": {
     "type": "object",
     "additionalProperties": false,
     "properties": {
      "kind": {
       "enum": [
        "solid",
        "gradient",
        "image",
        "video"
       ]
      },
      "colors": {
       "type": "array",
       "items": {
        "type": "string",
        "pattern": "^#[0-9a-fA-F]{6}$"
       },
       "maxItems": 3
      },
      "angle": {
       "type": "number",
       "minimum": 0,
       "maximum": 360
      },
      "image": {
       "type": "string",
       "description": "https:// (arquivo enviado pelo Estúdio) ou data:image/...;base64 / data:video/mp4;base64 (enviado ao importar)."
      },
      "video": {
       "type": "string",
       "description": "https:// (arquivo enviado pelo Estúdio) ou data:image/...;base64 / data:video/mp4;base64 (enviado ao importar)."
      },
      "dim": {
       "type": "number",
       "minimum": 0,
       "maximum": 0.9
      },
      "vignette": {
       "type": "number",
       "minimum": 0,
       "maximum": 1
      },
      "glow": {
       "type": "object",
       "additionalProperties": false,
       "required": [
        "color"
       ],
       "properties": {
        "color": {
         "type": "string",
         "pattern": "^#[0-9a-fA-F]{6}$"
        },
        "x": {
         "type": "number",
         "minimum": 0,
         "maximum": 1
        },
        "y": {
         "type": "number",
         "minimum": 0,
         "maximum": 1
        },
        "size": {
         "type": "number",
         "minimum": 0.1,
         "maximum": 1
        }
       }
      },
      "poster": {
       "type": "boolean",
       "description": "A capa em foco aparece desfocada no fundo do Início."
      },
      "parallax": {
       "type": "number",
       "minimum": 0,
       "maximum": 1
      }
     }
    },
    "layers": {
     "type": "array",
     "maxItems": 4,
     "items": {
      "type": "object",
      "additionalProperties": false,
      "required": [
       "kind"
      ],
      "properties": {
       "kind": {
        "const": "particles"
       },
       "shape": {
        "enum": [
         "snow",
         "dot",
         "star",
         "spark",
         "heart",
         "petal"
        ]
       },
       "items": {
        "type": "array",
        "items": {
         "type": "string",
         "description": "Um emoji (até 4 caracteres) ou uma imagem (https ou data:image)."
        },
        "maxItems": 4
       },
       "motion": {
        "enum": [
         "fall",
         "rise",
         "float",
         "twinkle",
         "drift",
         "swirl"
        ]
       },
       "count": {
        "type": "integer",
        "minimum": 1,
        "maximum": 40
       },
       "speed": {
        "type": "number",
        "minimum": 0.25,
        "maximum": 3
       },
       "size": {
        "type": "array",
        "items": {
         "type": "number",
         "minimum": 4,
         "maximum": 64
        },
        "minItems": 2,
        "maxItems": 2
       },
       "opacity": {
        "type": "number",
        "minimum": 0.1,
        "maximum": 1
       },
       "color": {
        "type": "string",
        "pattern": "^#[0-9a-fA-F]{6}$"
       },
       "depth": {
        "type": "boolean"
       },
       "where": {
        "enum": [
         "home",
         "all"
        ]
       }
      }
     }
    },
    "intro": {
     "type": "object",
     "additionalProperties": false,
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "maxLength": 40
      },
      "sub": {
       "type": "string",
       "maxLength": 80
      },
      "items": {
       "type": "array",
       "items": {
        "type": "string",
        "description": "Um emoji (até 4 caracteres) ou uma imagem (https ou data:image)."
       },
       "maxItems": 4
      },
      "color": {
       "type": "string",
       "pattern": "^#[0-9a-fA-F]{6}$"
      }
     }
    },
    "countdown": {
     "type": "object",
     "additionalProperties": false,
     "required": [
      "to",
      "label"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "\"MM-DD\" ou \"MM-DD HH:mm\" (todo ano, horário de Brasília), \"pascoa\", \"carnaval\" ou uma data completa ISO (uma vez).",
       "examples": [
        "12-25",
        "01-01 00:00",
        "pascoa",
        "2026-12-20T16:00:00-03:00"
       ]
      },
      "label": {
       "type": "string",
       "maxLength": 30
      },
      "days": {
       "type": "integer",
       "minimum": 1,
       "maximum": 120
      }
     }
    },
    "moments": {
     "type": "array",
     "maxItems": 6,
     "items": {
      "type": "object",
      "additionalProperties": false,
      "required": [
       "at"
      ],
      "properties": {
       "at": {
        "type": "string",
        "description": "\"MM-DD\" ou \"MM-DD HH:mm\" (todo ano, horário de Brasília), \"pascoa\", \"carnaval\" ou uma data completa ISO (uma vez).",
        "examples": [
         "12-25",
         "01-01 00:00",
         "pascoa",
         "2026-12-20T16:00:00-03:00"
        ]
       },
       "kind": {
        "enum": [
         "fireworks",
         "confetti",
         "snowstorm"
        ]
       },
       "text": {
        "type": "string",
        "maxLength": 40
       },
       "seconds": {
        "type": "integer",
        "minimum": 5,
        "maximum": 120
       }
      }
     }
    }
   }
  }
 }
}